diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-09-10 22:52:58 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-09-10 22:52:58 +0000 |
commit | 4671d198dbfd5fb3d6903fa7ac160756a3cbdef1 (patch) | |
tree | 8b6661810def3c439161a2529aae1b9a407449c1 /sbin/dhclient-script | |
parent | 240030098b2b6a283f4e945b6d720351758d22ea (diff) | |
download | pfsense-4671d198dbfd5fb3d6903fa7ac160756a3cbdef1.zip pfsense-4671d198dbfd5fb3d6903fa7ac160756a3cbdef1.tar.gz |
More full paths to files
Diffstat (limited to 'sbin/dhclient-script')
-rwxr-xr-x | sbin/dhclient-script | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sbin/dhclient-script b/sbin/dhclient-script index 1aee3d9..deb2c28 100755 --- a/sbin/dhclient-script +++ b/sbin/dhclient-script @@ -1,5 +1,5 @@ #!/bin/sh -# +# $Id$ # $OpenBSD: dhclient-script,v 1.6 2004/05/06 18:22:41 claudio Exp $ # $FreeBSD: src/sbin/dhclient/dhclient-script,v 1.4 2005/06/10 03:41:18 brooks Exp $ # @@ -25,6 +25,7 @@ HOSTNAME=/bin/hostname ROUTE=/sbin/route SED=/usr/bin/sed ARP=/usr/sbin/arp +IFCONFIG=/sbin/ifconfig LOCALHOST=127.0.0.1 @@ -57,11 +58,11 @@ arp_flush() { } delete_old_address() { - ifconfig $interface inet -alias $old_ip_address $medium + $IFCONFIG $interface inet -alias $old_ip_address $medium } add_new_address() { - ifconfig $interface \ + $IFCONFIG $interface \ inet $new_ip_address \ netmask $new_subnet_mask \ broadcast $new_broadcast_address \ @@ -78,14 +79,14 @@ add_new_address() { delete_old_alias() { if [ -n "$alias_ip_address" ]; then - ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1 + $IFCONFIG $interface inet -alias $alias_ip_address > /dev/null 2>&1 $ROUTE delete $alias_ip_address $LOCALHOST > /dev/null 2>&1 fi } add_new_alias() { if [ -n "$alias_ip_address" ]; then - ifconfig $interface inet alias $alias_ip_address netmask \ + $IFCONFIG $interface inet alias $alias_ip_address netmask \ $alias_subnet_mask $ROUTE add $alias_ip_address $LOCALHOST fi @@ -96,7 +97,7 @@ delete_old_routes() { for router in $old_routers; do if [ $if_defaultroute = x -o $if_defaultroute = $interface ]; then $ROUTE delete default $route >/dev/null 2>&1 - rm -f /tmp/${interface}_router + /bin/rm -f /tmp/${interface}_router fi done @@ -105,7 +106,7 @@ delete_old_routes() { while [ $# -gt 1 ]; do $ROUTE delete "$1" "$2" shift; shift - rm -f /tmp/${interface}_router + /bin/rm -f /tmp/${interface}_router done fi @@ -139,7 +140,7 @@ add_new_routes() { add_new_resolv_conf() { - rm -f /var/etc/nameservers.conf + /bin/rm -f /var/etc/nameservers.conf if [ -n "$new_domain_name_servers" ]; then for nameserver in $new_domain_name_servers; do @@ -181,15 +182,15 @@ fi case $reason in MEDIUM) - ifconfig $interface $medium - ifconfig $interface inet -alias 0.0.0.0 $medium >/dev/null 2>&1 + $IFCONFIG $interface $medium + $IFCONFIG $interface inet -alias 0.0.0.0 $medium >/dev/null 2>&1 /bin/sleep 1 ;; PREINIT) delete_old_alias - ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up - rm -f /tmp/${interface}_router + $IFCONFIG $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up + /bin/rm -f /tmp/${interface}_router ;; ARPCHECK|ARPSEND) @@ -239,7 +240,7 @@ TIMEOUT) if [ -n "$new_routers" ]; then $LOGGER "New Routers ($interface): $new_routers" set "$new_routers" - if ping -q -c 1 -w 1 "$1"; then + if /sbin/ping -q -c 1 -w 1 "$1"; then if [ "$new_ip_address" != "$alias_ip_address" ]; then add_new_alias fi @@ -249,7 +250,7 @@ TIMEOUT) fi fi fi - ifconfig $interface inet -alias $new_ip_address $medium + $IFCONFIG $interface inet -alias $new_ip_address $medium delete_old_routes exit_with_hooks ;; |