summaryrefslogtreecommitdiff
path: root/core/syslinux/syslinux-install_update
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-04 00:01:47 +0000
committerroot <root@rshg054.dnsready.net>2012-03-04 00:01:47 +0000
commitf0fa42126da9e3eec6b98388b35c67929fa20dae (patch)
tree0a4ad5b073e8500ff0e8920ba509942598576463 /core/syslinux/syslinux-install_update
parentd8fb549de0ef3299436c448f7b45fd8ebee8e733 (diff)
Sun Mar 4 00:01:47 UTC 2012
Diffstat (limited to 'core/syslinux/syslinux-install_update')
-rw-r--r--core/syslinux/syslinux-install_update22
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