1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

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
This commit is contained in:
Poul-Henning Kamp 2004-04-28 13:20:15 +00:00
parent 8956ceaff0
commit d8337944e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128714
2 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -57,8 +57,10 @@ network_start()
# Configure the interface(s).
network_common ifn_start verbose
# Resync ipfilter
/etc/rc.d/ipfilter resync
if [ -f /etc/rc.d/ipfilter ] ; then
# Resync ipfilter
/etc/rc.d/ipfilter resync
fi
}
network_stop()