diff options
-rw-r--r-- | scripts/vyatta-linkstatus.pl | 9 |
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); +} |