diff --git a/skel/shutdown b/skel/shutdown index 0f59623855bc8e8ad260eeeb57a090f88b26b5d1..b39f0f0decb9b8e27c65ba59b3891482f326a876 100755 --- a/skel/shutdown +++ b/skel/shutdown @@ -28,18 +28,18 @@ Time must be one of these formats: [ now | [+]mins | hh:mm ] where: mins or +mins : relative time; triggers the shutdown sequence after mins minutes. hh:mm : absolute time; triggers the shutdown sequence when the time hh:mm occurs. -See also 66-shutdown program to more features. +See also 66-shutdown program for more features. EOF exit 111 } die() { - printf "${PROG}:fatal: options must be set first\n" >&1 + printf "%s:fatal: options must be set first\n" "${PROG}" >&1 usage } -[ -z ${1} ] && die +[ -z "${1}" ] && die -[ ${1:0:1} != '-' ] && die +[ "${1%%"${1#?}"}" != '-' ] && die 66-shutdown "${@}"