staticroute
rc.d script during system start-up and shutdown,
and is intended for adding and removing static routes.
/etc/route.conf
/etc
.
/etc/rc.d/staticroute
staticroute
script is enabled in
rc.conf(5),
IP forwarding is turned on during
start-up, and a static route added for 192.168.2.0.
During system shutdown, the route is removed
and IP forwarding turned off.
# Turn on/off IP forwarding.
+sysctl -w net.inet.ip.forwarding=1
-sysctl -w net.inet.ip.forwarding=0
net 192.168.2.0 -netmask 255.255.255.0 192.168.150.2