diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-02-05 11:59:49 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-02-05 11:59:49 -0800 |
commit | 447e68376df70896a51bc6d96e6917aeb7963de7 (patch) | |
tree | 9cc7522f5d08045e24e28b2863202947604af764 /scripts | |
parent | 1a7d69a1db8249754ff3a0b43270fb6bfb5d6764 (diff) | |
download | vyatta-cfg-quagga-447e68376df70896a51bc6d96e6917aeb7963de7.tar.gz vyatta-cfg-quagga-447e68376df70896a51bc6d96e6917aeb7963de7.zip |
Change reload to restart
Need to restart daemon as well in this script
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-protocol | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/scripts/vyatta-protocol b/scripts/vyatta-protocol index d82e821d..3d354d8d 100755 --- a/scripts/vyatta-protocol +++ b/scripts/vyatta-protocol @@ -4,7 +4,7 @@ # progname=$0 usage() { - echo "Usage: $progname {start|stop|reload} {bgpd|ospfd|ripd|ripngd}" + echo "Usage: $progname {start|stop|restart} {bgpd|ospfd|ripd|ripngd}" exit 1; } @@ -27,14 +27,13 @@ fi case "$1" in start) sudo start-stop-daemon --start --quiet \ - --chdir $log_dir \ - --exec $exe_file \ + --chdir $log_dir --exec $exe_file \ -- -d -P 0 -i $pid_dir/${daemon}.pid sudo start-stop-daemon --start --quiet \ --chdir $log_dir \ --exec /usr/sbin/vyatta-watchquagga \ -- -p $pid_dir/watch-${daemon}.pid \ - -dz -r "/opt/vyatta/sbin/vyatta-quagga reload %s" $daemon + -dz -r "/opt/vyatta/sbin/vyatta-quagga restart %s" $daemon ;; stop) @@ -46,8 +45,14 @@ case "$1" in sudo rm -f $pid_dir/${daemon}.pid ;; - reload) - # Start new transaction + restart) + # Restart daemon + sudo start-stop-daemon --stop --quiet --oknodo --exec $exe_file + sudo start-stop-daemon --start --quiet \ + --chdir $log_dir --exec $exe_file \ + -- -d -P 0 -i $pid_dir/${daemon}.pid + + # Begin reloading transaction /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper begin || exit 1 # In case of error undo |