UPS software issued "rm -rf /*" Now what?
Hi!
I installed the Belkin Home Office UPS
and the included Linux Bulldog software on my
Linux box running Mandrake 9.1.
It complained about the install so I decided
to uninstall using the provided uninstall script
(see attached). A fault in the script ($path
not set) made the following command
rm -rf $path/*
become
rm -rf /*
Obviously, my system is now dead---comes up but stops
at the bootloader (grub). Is recovery possible?
It was set to the ext3 file system, are there ways that
I can try and recover the deleted files through grub?
Any ideas welcome?
Thanks.
=======================uninstall begin =============
#/bin/sh
# Copyright (c) 2002, Belkin Components
# Script Name: uninstall
# Platform: Linux (RedHat 5.2)
# Date: Feb/6/2002
# Description: Uninstallation program for Bulldog
path
set `/usr/bin/whoami`
if [ $1 != "root" ]
then
echo "You must login under root to execute this program."
echo "Bye !"
exit
fi
echo
echo -n "Do you really want to remove the Belkin Bulldog? [y|n] "
read answer
if [ $answer = "y" ]
then
pid=`/bin/cat $path/UPSD.PID 2> /dev/null`
# pid=`/bin/ps -e | grep upsd | cut -d" " -c1-5`
if [ "${pid}" != "" ]
then
kill -9 $pid
fi
rm -rf $path/*
rm -f $path/*
rm -f /etc/rc.d/rc3.d/S99upslim
rm -f /etc/rc.d/rc5.d/S99upslim
rm -f /usr/lib/libdryhttp.so
echo
echo "Uninstallation complete."
echo
else
echo "Bye !"
fi
=======================uninstall end=============