diff options
Diffstat (limited to 'core/syslinux/syslinux-install_update')
-rw-r--r-- | core/syslinux/syslinux-install_update | 22 |
1 files changed, 13 insertions, 9 deletions
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 |