From 5617681dbb181b66d48164ec74d89f55e370a4d5 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Fri, 18 Apr 2008 12:10:56 -0700 Subject: If watchlink isn't running, don't treat it as a fatal error. --- scripts/vyatta-watchlink-exclude.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts/vyatta-watchlink-exclude.pl') diff --git a/scripts/vyatta-watchlink-exclude.pl b/scripts/vyatta-watchlink-exclude.pl index eb9d280..b7a8916 100755 --- a/scripts/vyatta-watchlink-exclude.pl +++ b/scripts/vyatta-watchlink-exclude.pl @@ -89,7 +89,7 @@ sub remove_exclude_id { } } if ($match < 1) { - die "Error: no match found for $id"; + print "$0: no match found for $id"; } return @new_lines; } @@ -107,7 +107,7 @@ sub remove_exclude_line { } } if ($match < 1) { - die "Error: no match found for $remove_line"; + print "$0: no match found for $remove_line"; } return @new_lines; } @@ -172,7 +172,11 @@ write_exclude_file(@lines); if (defined $opt_signal) { if (! -e $watchlink_pid) { - die "Error: missing pid file [$watchlink_pid]\n"; + # + # watchlink may have been disabled, so don't treat + # this as an error + # + exit 0; } my $pid = `cat $watchlink_pid`; chomp $pid; -- cgit v1.2.3