[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Scripts in /etc/init.d Question and Comment.



At 19:35 -0400 07 Apr 2002, JPS <jpstewart@albatross.maxlingua.com> 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

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     aaron@schrab.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 debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: