Thread: iLiad Bricked My Iliad
View Single Post
Old 04-09-2007, 05:02 PM   #31
jayk
Enthusiast
jayk doesn't litterjayk doesn't litterjayk doesn't litter
 
Posts: 26
Karma: 201
Join Date: Mar 2007
Device: Iliad
On making it unbrickable

Hey Adam B.

A thought occurred to me... One of the things I occasionally do on freebsd/linux machines I've set up where people aside from me will have root access... If you put a file called -i in the really important directories - like / and /etc and /boot for example, it will force rm to prompt even if the -f flag was provided, because the shell interprets the rm -rf * as: rm -rf -i restoffiles

You can accomplish it easily by:

Code:
touch -- /-i /etc/-i
should make it much harder to accidentally erase everything with an errant rm -rf - it won't stop everything - but it adds a little safety.

JayK
jayk is offline   Reply With Quote