summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-04-18 11:09:27 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2008-04-18 11:09:27 -0700
commita406b7f4d56362ef1871be392d38156a93cee5a9 (patch)
treee5563cff3947a750b4bd9e6a6a6311a88d844ccb
parentb49ba8d58f27c94d0cc7dda38e3428aba1165183 (diff)
downloadvyatta-cfg-quagga-a406b7f4d56362ef1871be392d38156a93cee5a9.tar.gz
vyatta-cfg-quagga-a406b7f4d56362ef1871be392d38156a93cee5a9.zip
don't signal watchlink if it's not running
-rw-r--r--scripts/vyatta-linkstatus.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/vyatta-linkstatus.pl b/scripts/vyatta-linkstatus.pl
index 25c1adfb..a1381850 100644
--- a/scripts/vyatta-linkstatus.pl
+++ b/scripts/vyatta-linkstatus.pl
@@ -90,7 +90,8 @@ unlink($exclude_lck_file);
#finally kick the process
-open(PID, "< /var/run/vyatta/quagga/watchlink.pid") || die "could not open '/var/run/vyatta/quagga/watchlink.pid'";
-my $foo = <PID>;
-system "kill -10 $foo";
-close(PID);
+if (open(PID, "< /var/run/vyatta/quagga/watchlink.pid")) {
+ my $foo = <PID>;
+ system "kill -10 $foo";
+ close(PID);
+}