fix #24 (part II): always respond to -h with usage message

This commit is contained in:
2024-10-06 16:08:19 +02:00
parent db33a41983
commit 27aada4b8e

View File

@@ -223,7 +223,7 @@ jaildk_build() {
esac esac
done done
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
usage_build usage_build
fi fi
@@ -709,7 +709,7 @@ jaildk_install() {
esac esac
done done
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
usage_install usage_install
fi fi
@@ -789,7 +789,7 @@ jaildk_uninstall() {
esac esac
done done
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
usage_uninstall usage_uninstall
fi fi
@@ -1167,7 +1167,7 @@ jaildk_create() {
src=.template src=.template
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
usage_create usage_create
fi fi
@@ -1214,7 +1214,7 @@ jaildk_remove() {
esac esac
done done
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
usage_remove usage_remove
fi fi
@@ -1282,7 +1282,7 @@ jaildk_jail() {
if test "x$mode" = "xstatus"; then if test "x$mode" = "xstatus"; then
( (
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
bold "Running jails:" bold "Running jails:"
lookup='*' lookup='*'
else else
@@ -1345,7 +1345,7 @@ jaildk_jail() {
if test -n "$jail"; then if test -n "$jail"; then
jaildk_rc $jail -m status jaildk_rc $jail -m status
fi fi
elif test -z "$jail"; then elif test -z "$jail" -o "$jail" = "-h"; then
usage_$mode usage_$mode
else else
bold "Jail $jail $mode:" bold "Jail $jail $mode:"
@@ -1404,7 +1404,7 @@ jaildk_rc() {
rcd='all' rcd='all'
fi fi
if test -z "$jail" -o -z "$mode"; then if test -z "$jail" -o "$jail" = "-h" -o -z "$mode"; then
usage_rc usage_rc
fi fi
@@ -1464,7 +1464,7 @@ jaildk_blogin() {
jail=$1 jail=$1
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
file=`basename $0` file=`basename $0`
if test "$file" = "jaildk"; then if test "$file" = "jaildk"; then
file="$0 blogin" file="$0 blogin"
@@ -1513,7 +1513,7 @@ jaildk_login() {
me=`id -u` me=`id -u`
jexec="jexec" jexec="jexec"
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
file=`basename $0` file=`basename $0`
if test "$file" = "jaildk"; then if test "$file" = "jaildk"; then
file="$0 jlogin" file="$0 jlogin"
@@ -1575,7 +1575,7 @@ jaildk_reinstall() {
esac esac
done done
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
usage_reinstall usage_reinstall
fi fi
@@ -1882,7 +1882,7 @@ jaildk_freeze() {
esac esac
done done
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
usage_freeze usage_freeze
fi fi
@@ -2380,7 +2380,7 @@ jaildk_bootstrap() {
esac esac
done done
if test -z "$jail"; then if test -z "$jail" -o "$jail" = "-h"; then
usage_bootstrap usage_bootstrap
fi fi