update-kernel: Correct exit code on invalid option error
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
This commit is contained in:
parent
74e6915e7f
commit
cb6e0649d0
@ -67,7 +67,7 @@ Valid options are:
|
||||
-h, --help show this text and exit
|
||||
Run remove-old-kernels to uninstall unused kernels.
|
||||
EOF
|
||||
exit 0
|
||||
exit "$@"
|
||||
}
|
||||
|
||||
# compensate for absent rpmevrdtcmp tool
|
||||
@ -109,7 +109,7 @@ release=
|
||||
verbose=
|
||||
|
||||
#parse command line options
|
||||
TEMP=$(getopt -n "$PROG" -o A:,D:,a,i,l,f,y,t:,r:,v,n,H,h -l interactive,list,all,add:,force,type:,release:,verbose,reinstall,dry-run,download-only,headers,help -- "$@") || show_help
|
||||
TEMP=$(getopt -n "$PROG" -o A:,D:,a,i,l,f,y,t:,r:,v,n,H,h -l interactive,list,all,add:,force,type:,release:,verbose,reinstall,dry-run,download-only,headers,help -- "$@") || show_help 1
|
||||
eval set -- "$TEMP"
|
||||
|
||||
while :; do
|
||||
|
Loading…
Reference in New Issue
Block a user