diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-20 09:43:06 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-20 09:43:06 -0700 |
commit | b5ebff1894236ae188f047db78cdcdeedf47dfe1 (patch) | |
tree | 9678e90041eefd9b8adc7a61fa1ff1a233a0b2c4 /templates/system | |
parent | b3aef2e0a16a04f1c97609142784e4681b5e7087 (diff) | |
download | vyatta-cfg-system-b5ebff1894236ae188f047db78cdcdeedf47dfe1.tar.gz vyatta-cfg-system-b5ebff1894236ae188f047db78cdcdeedf47dfe1.zip |
Use pgrep to count number of matching processes
pgrep has simple flag to do what the ps | wc -l was doing.
Diffstat (limited to 'templates/system')
-rw-r--r-- | templates/system/ipv6/disable-forwarding/node.def | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/system/ipv6/disable-forwarding/node.def b/templates/system/ipv6/disable-forwarding/node.def index a029c81a..4d374455 100644 --- a/templates/system/ipv6/disable-forwarding/node.def +++ b/templates/system/ipv6/disable-forwarding/node.def @@ -34,7 +34,7 @@ delete: # If router advertisements were configured while global IPv6 # forwarding was disabled, we will need to start the radvd daemon # now. - running=`ps --no-headers -C radvd | wc -l` + running=$(pgrep -n radvd) if [ $running -eq 0 -a -e /etc/radvd.conf -a -x /etc/init.d/radvd ]; then /etc/init.d/radvd start fi |