From 9bfa539e02b41f05c0927850288a1281aebc4a68 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Sat, 19 Dec 2020 17:34:53 +0100 Subject: [PATCH] fixed rc function: only call rc-script specified with -r --- jaildk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jaildk b/jaildk index de54766..ca1fc0a 100755 --- a/jaildk +++ b/jaildk @@ -1,6 +1,6 @@ #!/bin/sh -version=1.14 +version=1.15 usage_jaildk() { beg=`tput -T ${TERM:-cons25} md` @@ -1076,7 +1076,7 @@ jaildk_rc() { shift shift - rc='' + rcd='' while getopts "r:" arg; do case $arg in @@ -1085,8 +1085,8 @@ jaildk_rc() { esac done - if test -z "$rc"; then - rc='all' + if test -z "$rcd"; then + rcd='all' fi if test -z "$jail" -o -z "$mode"; then @@ -1099,7 +1099,7 @@ jaildk_rc() { rcs=`get_rc_scripts $jail` - if test $rc = "all"; then + if test $rcd = "all"; then bold "Jail $jail rc status:" for script in $rcs; do jexec $jail $script $mode @@ -1107,7 +1107,7 @@ jaildk_rc() { else ok='' for script in $rcs; do - if echo "$script" | egrep -q "/$rc"; then + if echo "$script" | egrep -q "/${rcd}\$"; then jexec $jail $script $mode ok=1 fi