summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-04-18 12:10:56 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-04-18 12:10:56 -0700
commit5617681dbb181b66d48164ec74d89f55e370a4d5 (patch)
treeedabd7b293e8ff240e72c0e37626f377f7012ff5 /scripts
parentfd5ebf6b81c2273ba77f66c7e9b17856b462ef01 (diff)
downloadvyatta-cfg-5617681dbb181b66d48164ec74d89f55e370a4d5.tar.gz
vyatta-cfg-5617681dbb181b66d48164ec74d89f55e370a4d5.zip
If watchlink isn't running, don't treat it as a fatal error.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-watchlink-exclude.pl10
1 files changed, 7 insertions, 3 deletions
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;