adding renice IFACE option
[rrq/rrqnet.git] / rrqnet-ifupdown.sh
index 25517fab20f2c792af802f2f15cbe40872953aa9..98d97e72c9d27e54d6d256d15eb8b2dc78b5fc1c 100755 (executable)
@@ -19,6 +19,7 @@
 
 # An rrqnet stanza may have the following settings:
 # rrqnet_port <port>
+# rrqnet_renice <nice>
 # rrqnet_remote <remote declaration>
 # rrqnet_options <options>
 # rrqnet_log <level> <pathname>
@@ -53,6 +54,9 @@ 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