From: Ralph Ronnquist Date: Wed, 6 Jan 2021 08:07:24 +0000 (+1100) Subject: corrected renice handling X-Git-Tag: 0.3.2~2 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=a1c04f2fb24cfc41c5b1803df986617100d467bb;p=rrq%2Frrqnet.git corrected renice handling --- diff --git a/rrqnet-ifupdown.sh b/rrqnet-ifupdown.sh index 98d97e7..2789695 100755 --- a/rrqnet-ifupdown.sh +++ b/rrqnet-ifupdown.sh @@ -45,6 +45,8 @@ configure_tap_up() { start_cable_pre_up() { configure_tap_up || return 1 configure_tap_bridge || return 1 + [ -z "$IF_RRQNET_RENICE" ] || \ + RRQDAEMON="/usr/bin/nice -n $IF_RRQNET_RENICE $RRQDAEMON" if [ -z "$IF_RRQNET_LOG" ] ; then daemon -U -r -n $NAME -- \ $RRQDAEMON $IF_RRQNET_OPTIONS \ @@ -54,9 +56,6 @@ start_cable_pre_up() { $RRQDAEMON ${IF_RRQNET_LOG%% *} $IF_RRQNET_OPTIONS \ -t $IFACE $IF_RRQNET_PORT $IF_RRQNET_REMOTE fi - CHPID="$(cat /var/run/$NAME)" - [ -z "$RRQNET_RENICE" ] || [ -z "$CHPID" ] || \ - renice -n "$RRQNET_RENICE" "$CHPID" } #function