--- /usr/sbin/syslinux-install_update 2011-08-02 15:43:01.000000000 +0200 +++ syslinux-install_update 2011-09-12 21:35:56.793355725 +0200 @@ -357,12 +357,6 @@ 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 @@ fi ;; h) - usage - exit 0 + USAGE="True" ;; i) INSTALL="True" @@ -408,6 +401,17 @@ 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