Changeset 10598 in hybrid for branches/releng-9.0/nanobsd
- Timestamp:
- Apr 26, 2012, 6:42:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/releng-9.0/nanobsd/files/etc/dhclient-exit-hooks
r10595 r10598 21 21 22 22 update_pf_conf() { 23 if is_default_interface; then 24 new_ext_if_gw=`route -n get default | awk '/gateway/ {print $2}'` 25 if [ -n "$new_ext_if_gw" ]; then 26 if [ -a "$new_ext_if_gw" != "$ext_if_gw" ]; then 27 info "Reloading PF firewall to load new ext_if_gw=$ext_if_gw" 28 { grep -v '^ext_if_gw=' $rc_conf_running; echo "ext_if_gw=$new_ext_if_gw"; } > $rc_conf_running 29 /etc/rc.d/pf reload 30 fi 31 fi 32 fi 33 23 34 # Make sure not to nuke the default route on an ileiden proxy, 24 35 # as it will rendering it usefull … … 26 37 27 38 if checkyesno "service_proxy_normal" && checkyesno "service_accesspoint"; then 28 if is_default_interface; then 29 new_ext_if_gw=`route -n get default | awk '/gateway/ {print $2}'` 30 if [ -n "$new_ext_if_gw" ]; then 31 if [ -a "$new_ext_if_gw" != "$ext_if_gw" ]; then 32 info "Reloading PF firewall to load new ext_if_gw=$ext_if_gw" 33 { grep -v '^ext_if_gw=' $rc_conf_running; echo "ext_if_gw=$new_ext_if_gw"; } > $rc_conf_running 34 /etc/rc.d/pf reload 35 fi 36 37 warn "Removing default route as machine is marked as service_proxy AND service_accesspoint" 38 route -q del default 39 fi 40 fi 39 warn "Removing default route as machine is marked as service_proxy AND service_accesspoint" 40 route -q del default 41 41 fi 42 42 }
Note:
See TracChangeset
for help on using the changeset viewer.