nmhw-auto-part: Now shows usage when presented with an unsupported argument.

BugzID: 54510

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
This commit is contained in:
Lucien Mueller 2018-12-14 10:18:58 +01:00
parent cc0f881661
commit 0722982b5c
1 changed files with 7 additions and 1 deletions

View File

@ -296,7 +296,7 @@ execute(){
touch /etc/nmhw-auto-part/overlay touch /etc/nmhw-auto-part/overlay
;; ;;
*) *)
echo "Error: $ptype is not an option." echo "$ptype is not an option."
;; ;;
esac esac
@ -352,6 +352,12 @@ elif (( $# == 1 )) ; then
description description
exit 0 exit 0
;; ;;
*)
echo "${0##*/} : $1 is not an option."
usage
description
exit 1
;;
esac esac
elif (( $# == 4 )) ; then elif (( $# == 4 )) ; then
scripted_mode $1 $2 $3 $4 scripted_mode $1 $2 $3 $4