diff options
author | phk <phk@FreeBSD.org> | 2004-04-28 13:20:15 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-04-28 13:20:15 +0000 |
commit | c37cc5e191d567fe04506549ff2e4fa3f06870ad (patch) | |
tree | bd2ebeaaface80df3276878be90005aafb6f3b0f /etc/rc.d/ipfw | |
parent | beede09a6df4d537c41af2a64fd53fa2d5d035c4 (diff) | |
download | FreeBSD-src-c37cc5e191d567fe04506549ff2e4fa3f06870ad.zip FreeBSD-src-c37cc5e191d567fe04506549ff2e4fa3f06870ad.tar.gz |
Protect som cross-script invocations by checks to see that the target
script exists. This allows pruning of rc.d scripts without getting
too many ugly boottime error message
Diffstat (limited to 'etc/rc.d/ipfw')
-rw-r--r-- | etc/rc.d/ipfw | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/rc.d/ipfw b/etc/rc.d/ipfw index 990c14e..2e8100c 100644 --- a/etc/rc.d/ipfw +++ b/etc/rc.d/ipfw @@ -37,7 +37,9 @@ ipfw_start() if [ -r "${firewall_script}" ]; then . "${firewall_script}" echo -n 'Firewall rules loaded, starting divert daemons:' - /etc/rc.d/natd start + if [ -f /etc/rc.d/natd ] ; then + /etc/rc.d/natd start + fi elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then echo 'Warning: kernel has firewall functionality, but' \ ' firewall rules are not enabled.' @@ -62,7 +64,9 @@ ipfw_stop() # Disable the firewall # ${SYSCTL_W} net.inet.ip.fw.enable=0 - /etc/rc.d/natd stop + if [ -f /etc/rc.d/natd ] ; then + /etc/rc.d/natd stop + fi } load_rc_config $name |