Skip to content

Commit

Permalink
Make sure asroot passes all args
Browse files Browse the repository at this point in the history
  • Loading branch information
lbussy committed Mar 31, 2021
1 parent 2366def commit 440e675
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/asroot.inc
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ asroot() {
retval="$?"
if [[ "$retval" == "0" ]]; then
# If we are not root/sudo, relaunch as such
echo -e "\nNot running as root, relaunching correctly." > /dev/tty
echo -e "\nNot running as root, relaunching." > /dev/tty
sleep 2
eval "sudo bash $SCRIPTPATH/$THISSCRIPT $*"
eval "sudo bash $SCRIPTPATH/$THISSCRIPT $@"
exit $?
else
# sudo not available, give instructions
echo -e "\nThis script must be run as root: sudo $SCRIPTPATH/$THISSCRIPT $*" 1>&2 > /dev/tty
echo -e "\nThis script must be run as root: sudo $SCRIPTPATH/$THISSCRIPT $@" 1>&2 > /dev/tty
exit 1
fi
fi
Expand Down

0 comments on commit 440e675

Please sign in to comment.