From f0fa42126da9e3eec6b98388b35c67929fa20dae Mon Sep 17 00:00:00 2001 From: root Date: Sun, 4 Mar 2012 00:01:47 +0000 Subject: Sun Mar 4 00:01:47 UTC 2012 --- core/syslinux/syslinux-install_update | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'core/syslinux/syslinux-install_update') diff --git a/core/syslinux/syslinux-install_update b/core/syslinux/syslinux-install_update index f7cd123e1..cd1baa572 100644 --- a/core/syslinux/syslinux-install_update +++ b/core/syslinux/syslinux-install_update @@ -28,7 +28,7 @@ shopt -s nullglob libpath="/usr/lib/syslinux" bootpath="/boot/syslinux" -extlinux="/sbin/extlinux" +extlinux="/usr/sbin/extlinux" autoupdate_file=/boot/syslinux/SYSLINUX_AUTOUPDATE com32_files=(menu.c32 vesamenu.c32 chain.c32 hdt.c32 reboot.c32 poweroff.com) @@ -357,12 +357,6 @@ update() { fi } -# Make sure only root can run our script -if (( $(id -u) != 0 )); then - echo "This script must be run as root" 1>&2 - exit 1 -fi - if (( $# == 0 )); then usage exit 1 @@ -378,8 +372,7 @@ while getopts "c:uihmas" opt; do fi ;; h) - usage - exit 0 + USAGE="True" ;; i) INSTALL="True" @@ -408,6 +401,17 @@ while getopts "c:uihmas" opt; do esac done +if [[ $USAGE ]]; then + usage + exit 0 +fi + +# Make sure only root can run our script +if (( $(id -u) != 0 )); then + echo "This script must be run as root" 1>&2 + exit 1 +fi + # Display Usage Information if both Install and Update are passed if [[ $INSTALL && $UPDATE ]]; then usage -- cgit v1.2.3-54-g00ecf