John H. Robinson, IV wrote:
> I was trying to add some documentation packages today, and kept getting
> annoyed that it would not let me - I was not root. I decided that it
> should know that I was the admin, and let me do it anyway.
>
> This is what I came up with:
And there is a bug.
Change all :- to :+
$HOME/bin/aptitude
-- >% -- CUT HERE -- %< --
#!/bin/sh
PROGRAM=/usr/bin/aptitude
SUDO=/usr/bin/sudo
NEED_ROOT=255
$PROGRAM ${1:+"$@"}
if [ $? -eq $NEED_ROOT ]
then
exec $SUDO $PROGRAM ${1:+"$@"}
fi
-- >% -- CUT HERE -- %< --
-john
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list