Changeset efc99f2 for bootscripts/clfs/sysconfig/network-devices/services
- Timestamp:
- Oct 31, 2006, 9:38:50 PM (18 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 728f219
- Parents:
- 0928ac4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bootscripts/clfs/sysconfig/network-devices/services/ipv4-static
r0928ac4 refc99f2 51 51 up) 52 52 boot_mesg "Adding IPv4 address ${IP} to the ${1} interface..." 53 ip addr add ${args} dev ${1} 53 if [ "${INTERFACE}" != "" ]; then 54 ip addr add ${args} dev ${1} label ${1} 55 else 56 ip addr add ${args} dev ${1} 57 fi 54 58 evaluate_retval 55 59 56 if [ -n "${GATEWAY}" ]; then 57 if ip route | grep -q default; then 58 boot_mesg "Gateway already setup; skipping." ${WARNING} 59 echo_warning 60 else 61 boot_mesg "Setting up default gateway..." 62 ip route add default via ${GATEWAY} dev ${1} 63 evaluate_retval 64 fi 60 if [ "${INTERFACE}" = "" ]; then 61 if [ -n "${GATEWAY}" ]; then 62 if ip route | grep -q default; then 63 boot_mesg "Gateway already setup; skipping." ${WARNING} 64 echo_warning 65 else 66 boot_mesg "Setting up default gateway..." 67 ip route add default via ${GATEWAY} dev ${1} 68 evaluate_retval 69 fi 70 fi 65 71 fi 66 72 ;; 67 73 68 74 down) 69 if [ -n "${GATEWAY}" ];then70 boot_mesg "Removing default gateway..."71 ip route del default75 if [ "${INTERFACE}" = "" ]; then 76 boot_mesg "Removing Settings From ${1} interface..." 77 ip address flush dev ${1} 72 78 evaluate_retval 73 79 fi 74 75 boot_mesg "Removing IPv4 address ${IP} from the ${1} interface..."76 ip addr del ${args} dev ${1}77 evaluate_retval78 80 ;; 79 81
Note:
See TracChangeset
for help on using the changeset viewer.