fixed "jaildk status' (w/o jail) and jaildk_rc all

This commit is contained in:
Thomas von Dein
2020-12-13 14:17:13 +01:00
parent 9a420006c5
commit 2f38a0c7d8

10
jaildk
View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
version=1.09 version=1.10
usage_jaildk() { usage_jaildk() {
beg=`tput -T ${TERM:-cons25} md` beg=`tput -T ${TERM:-cons25} md`
@@ -960,9 +960,7 @@ jaildk_jail() {
jail=$2 jail=$2
mode=$1 mode=$1
if test -z "$jail"; then if test -z "$jail" -a $mode = "status"; then
usage_$mode
elif test -z "$jail" -a $mode = "status"; then
bold "Running jails:" bold "Running jails:"
bold " JID IP Address Hostname Path" bold " JID IP Address Hostname Path"
jls | grep -v JID jls | grep -v JID
@@ -978,6 +976,8 @@ jaildk_jail() {
jls | grep -v JID | awk '{print $3}' | while read J; do jls | grep -v JID | awk '{print $3}' | while read J; do
jaildk_rc $J status jaildk_rc $J status
done done
elif test -z "$jail"; then
usage_$mode
else else
bold "Jail $jail $mode:" bold "Jail $jail $mode:"
case $mode in case $mode in
@@ -1014,7 +1014,7 @@ Execute an rc.d script inside <jail> with parameter <mode>. Options:
jaildk_rc() { jaildk_rc() {
jail=$1 jail=$1
mode=$1 mode=$2
shift shift
shift shift