I know, I'm no one to talk. I make dumb coding mistakes too, but recently I ran across a classic.
I was just finishing up a Linux server install for Counterpoint ( /Linux/cp.html). All users had been created, all minor configuration details tweaked, and the system was in the process of doing it's first DVD-RAM backup ( /Reviews/dvdram.html).
It was then that we remembered that the UPS software hadn't been configured. This particular UPS communicated by a USB port, and had Linux software which had already been downloaded. So, while the DVD-RAM backup was running, I installed the downloaded software, but it didn't seem to recognize the possibility of communicating by way of USB. Thinking that perhaps I had missed something or had made some mistake, I decided to run the uninstall script so thoughtfully included with the software.
I was prompted "Do you really want to remove the Belkin Bulldog Plus:!y|n] "
Sure I did. I answered "Y" and just a moment later I saw a rather odd message from rm complaining that it couldn't remove /boot. Huh? What the..
Ayup. This uninstall script had started at / and removed EVERYTHING. I powered off the machine the second I saw that, hoping that disk buffers hadn't yet been flushed, but I was too late: all our hard work was gone. Had the backup perhaps finished? I hoped it had, but no printout had come out yet, so it certainly wasn't completely finished. Ever the optimist, I booted from the DVD and let t restore. Unfortunately, it hadn't even completely finished the base OS stuff, so I had to start over from scratch: reinstall, reconfigure everything. Two extra hours of work and then some.
Later, I looked at the script to see how it screwed up. The basic problem was that it did a
rm -rf $path/*
but unfortunately $path was NOT set, so that ends up as
rm -rf /*
A silly mistake, but one that could have been very costly. Imagine if this server were actually in use when this happened!
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
I downloaded the Bulldog program & when I tried to uninstall it all I got were error messages. Now I am getting a ton of pop-up & I know that somehow this program has created them & there is nothing I know of to get rid of it. I have tried repeatedly to uninstall the thing & even delete the envelope with the programs in it but nothing works. Please help!! e-mail me at: ariel_dehaviland@yahoo.com
--
No idea what "Bulldog" is.. sounds like a virus to me..
--TonyLawrence
---November 17, 2004
Man, I'm glad to know I'm not the only one. I had *exactly* the same experience on my Debian system last night. I tried to uninstall the Bulldog software and the uninstall program had my entire filesystem for high tea.
This was, inarguably, bad programming. It was dumb of me, though, not to check for the latest software update. The latest version (3.01.18, as of this date) has recognized and fixed the bad programming of the earlier version. The script now starts out,
path=/usr/local/bulldog
if [ "${path}="" ]
then
exit
All I can say is, thank heaven for Mondo Rescue software. I popped in the Mondo/Mindi CD, booted from CD, and 20 minutes later I was back up & running, in precisely the same configuration as before the incident, with all data restored.
Mondo Rescue is free software. I've used it with RedHat and Debian. Itz da bomb.
---November 17, 2004
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar