Mistakenly delete /usr/share/ partially - What is best course of action

Bruce

New Member
Joined
Nov 16, 2007
Messages
162
Reaction score
0
Hi Everyone,

I mistakenly did a "rm -rf /usr/share/" and it was really stupid but I caught it less than a second after I pressed enter. So, then I copied some of the files from another PiaF box which also had CentOS 5.5 but might have had a slight PiaF version difference (the minor version difference 17554 vs 17552 maybe???!!).

I also did "rpm -Va" and re-installed many packages. Things seem to run smooth but I haven't dared to restart Asterisk or restart the server. In part because I am not yet sure what the /usr/share/grub was responsible for and it was deleted and don't know where to get it's replacement.

However, more importantly, the flash operator doesn't seem to work and I am wondering if it has to do anything with /usr/share/java which was also deleted.

Should I be to do a "yum reinstall java" as I did to other packages and get FOP working?

amportal fop_restart didn't help.

FOP loads fine but then it doesn't show channels in ringing mode or up.

Nothing else was tampered with or removed from this server which is a Gold install of PiaF.

I am also worried about /usr/share/dahdi which was deleted but then I copied/pasted from other system. Please share your thought on above point.

Your feedback is greatly appreciated.

P.S. Re-install is the VERY VERY VERY last option I would consider as this server is 1600 miles away and there is no KVM on this server so I have to ask someone with no technical knowledge to help me and downtime is very bad in this instance.
 
I'm not running the same version as you (older asterisk 1.6 with freePBX 2.8) and I ran the ls command with the -l (long listing option) and the R option (recursive subdirectories):

ls -lR /usr/share > usr-share.txt

to create a directory listing of all the files in a text file named usr-share.txt (the file is 2 MB in size!). Maybe someone who is running the same version as you can email their copy of the usr-share.txt file. The file shows the directory listings for each subdirectory like this example:

/usr/share/aclocal:
total 100
-rw-r--r-- 1 root root 6793 Jan 6 2007 audiofile.m4
-rw-r--r-- 1 root root 1807 Jan 7 2007 bison-i18n.m4
-rw-r--r-- 1 root root 7511 Jan 6 2007 fontutil.m4
-rw-r--r-- 1 root root 6288 Nov 16 09:55 freetype2.m4
-rw-r--r-- 1 root root 8289 Mar 24 2009 glib-2.0.m4
-rw-r--r-- 1 root root 12541 Mar 24 2009 glib-gettext.m4
-rw-r--r-- 1 root root 1121 Jan 6 2007 gnome-doc-utils.m4
-rw-r--r-- 1 root root 7532 Nov 25 10:42 gtk-2.0.m4
-rw-r--r-- 1 root root 7880 Oct 12 09:07 libxml.m4
-rw-r--r-- 1 root root 5232 May 24 2008 pkg.m4
 
Thought that I would mention that I know how you feel. I accidentally started erasing all of the companies autocad files (del *.*) instead of dir *.*. When I heard the hard-drive chugging away, I knew something was wrong and immediately turned off the power. Only lost about 500 out of 1500 files! Then found out there wasn't a backup system in place! Fortunately, this was in the late 80s and sneaker-net was in place, so there were lots of copies floating around on 5 or 6 PCs (286).
 
Here's what's in my /usr/share/dahdi

/usr/share/dahdi:
total 956
-rwxr-xr-x 1 root root 2866 Mar 4 2010 astribank_hook
-rw-r--r-- 1 root root 173416 Mar 4 2010 FPGA_1141.hex
-rw-r--r-- 1 root root 186796 Mar 4 2010 FPGA_1151.hex
-rw-r--r-- 1 root root 276378 Mar 4 2010 FPGA_1161.hex
-rw-r--r-- 1 root root 172642 Mar 4 2010 FPGA_FXS.hex
-rwxr-xr-x 1 root root 12606 Mar 4 2010 init_card_1_30
-rwxr-xr-x 1 root root 12195 Mar 4 2010 init_card_2_30
-rwxr-xr-x 1 root root 14012 Mar 4 2010 init_card_3_30
-rwxr-xr-x 1 root root 12535 Mar 4 2010 init_card_4_30
-rw-r--r-- 1 root root 8421 Mar 4 2010 PIC_TYPE_1.hex
-rw-r--r-- 1 root root 6109 Mar 4 2010 PIC_TYPE_2.hex
-rw-r--r-- 1 root root 6739 Mar 4 2010 PIC_TYPE_3.hex
-rw-r--r-- 1 root root 6207 Mar 4 2010 PIC_TYPE_4.hex
-rw-r--r-- 1 root root 21609 Mar 4 2010 USB_FW.hex
-rwxr-xr-x 1 root root 2414 Mar 4 2010 waitfor_xpds
-rw-r--r-- 1 root root 879 Mar 4 2010 XppConfig.pm
-rwxr-xr-x 1 root root 7606 Mar 4 2010 xpp_fxloader

Looks mainly to be xorcom astribank stuff
 
If you have an old PC lying around. Install the same version as what was on the blown server. Then you would have a record of exactly what should be and where.
 
Thanks for all the feedback guys. I think everyone is bit or will be by this bad performance of Ext3 file-system where there is no adequate Recycle bin. Even M$ provides a recycle bin...anyhow.

Currently it seems things are fine and as mentioned /usr/share/dahdi looks like stuff from xorocom and things that are not even loaded on my server.

I am more concerned as to what the /usr/share/grub might have been as it was deleted.

I doubt i can find the exact copy to install now since older versions are not kept to be downloaded and PiaF version numbers are confusing anyhow.

I would appreciate getting /usr/share/grub files for this version and any inputs on the FOP problem I am having. Anyone know why that might be failing? /usr/share/java?

Can I do a "yum reinstall java" without breaking things?


PBX in a Flash SILVER Daemon Status - Version 1.7.9 Released on 110910
 
Recycle bins are for people who don't know what they are doing.

Sounds like you need to make rm interactive, so it asks you if you are sure you want to delete for each file.

I personally can't stand an OS that asks me if I am sure a million times.

Add this to your bash_profile

alias rm='rm -i'
 
The main grub folder is in /boot/grub, /usr/share/grub seesm to have just the following files:

ascii.pf2 unicode.pf2
 
If you have a similar system available, you could attempt to rsync /usr/share from the working system to the impacted system.

This can be done remotely very easily. It's a little risky if you had anything that was customized in /usr/share, though.

On the impacted system:
Code:
rsync -avz [email protected]:/usr/share /usr/share
This will transfer everything in archive mode including symbolic links and should preserve user/group/file permissions.

Don't feel too bad - circa 1998, I did something similar on one of my systems at home that was dual-boot with Red Hat Linux 5.2 and Windows 98 with a Netware 4.11 server and Windows 98 partition mounted under Linux. I mistakenly changed to / and did rm -rf *.

It wiped all of Windows 98 (no great loss), some of the Linux install, and I managed to save it before it hit the Netware mount.

Consider it a learning experience.
 

Members online

No members online now.

Forum statistics

Threads
26,688
Messages
174,412
Members
20,259
Latest member
Fadeek86
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top