Re: Scripts in /etc/init.d Question and Comment.
At 19:35 -0400 07 Apr 2002, JPS <firstname.lastname@example.org> wrote:
> me to raise my awareness!). How about prefacing the scripts in
> `/etc/init.d' with something along the lines of:
> if [ ! $EUID == 0 ]; then
> echo "Sorry, this script must run with root privileges."
If this is done, that bit of code shouldn't be used (at least in most
cases) since $EUID is a bashism. I'd suggest something like:
if [ ! -O / ] # Check if root directory is owned by current user
Aaron Schrab email@example.com http://www.schrab.com/aaron/
However, since procmail is the ultimate supply of rope for mail hacking,
here are the directions for tying a noose: -- Philip Guenther
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com