Disguising stderr from jls generally considered harmful

Undisguising it dumps out the following logspew:

jls: unknown parameter: allow

PR: 191019
This commit is contained in:
Enji Cooper 2015-02-21 23:39:43 +00:00
parent c6014c739c
commit 7a2065efd7
2 changed files with 4 additions and 2 deletions

View File

@ -4,7 +4,7 @@
jail_name_to_jid()
{
local check_name="$1"
jls -j "$check_name" -s 2>/dev/null | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g'
jls -j "$check_name" -s | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g'
}
base=pgrep_j_test
@ -38,6 +38,7 @@ for i in `seq 1 10`; do
esac
sleep 0.1
done
sleep 0.5
pid1="$(pgrep -f -x -j "$jid" "$sleep $sleep_amount" | sort)"
pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \

View File

@ -4,7 +4,7 @@
jail_name_to_jid()
{
local check_name="$1"
jls -j "$check_name" -s 2>/dev/null | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g'
jls -j "$check_name" -s | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g'
}
base=pkill_j_test
@ -40,6 +40,7 @@ for i in `seq 1 10`; do
esac
sleep 0.1
done
sleep 0.5
if pkill -f -j "$jid" $sleep && sleep 0.5 &&
! -f ${PWD}/${base}_1_1.pid &&