Changeset 1d02f01 in bootscripts-standard for clfs/sysconfig/network-devices/services/ipv4-static
- Timestamp:
- Oct 23, 2007, 1:07:58 AM (17 years ago)
- Branches:
- master
- Children:
- 1680407
- Parents:
- d8a3177
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
clfs/sysconfig/network-devices/services/ipv4-static
rd8a3177 r1d02f01 44 44 fi 45 45 46 if [ -n "${SOURCE}" ]; then47 args="${args} src ${SOURCE}"48 fi49 50 46 case "${2}" in 51 47 up) 52 48 boot_mesg "Adding IPv4 address ${IP} to the ${1} interface..." 53 if [ "${INTERFACE}" != "" ]; then 54 ip addr add ${args} dev ${1} label ${1} 55 else 56 ip addr add ${args} dev ${1} 57 fi 49 ip addr add ${args} dev ${1} 58 50 evaluate_retval 59 51 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 52 if [ -n "${GATEWAY}" ]; then 53 if ip route | grep -q default; then 54 boot_mesg "Gateway already setup; skipping." ${WARNING} 55 echo_warning 56 else 57 boot_mesg "Setting up default gateway..." 58 ip route add default via ${GATEWAY} dev ${1} 59 evaluate_retval 60 fi 71 61 fi 72 62 ;; 73 63 74 64 down) 75 if [ "${INTERFACE}" = "" ];then76 boot_mesg "Removing Settings From ${1} interface..."77 ip address flush dev ${1}65 if [ -n "${GATEWAY}" ]; then 66 boot_mesg "Removing default gateway..." 67 ip route del default 78 68 evaluate_retval 79 69 fi 70 71 boot_mesg "Removing IPv4 address ${IP} from the ${1} interface..." 72 ip addr del ${args} dev ${1} 73 evaluate_retval 80 74 ;; 81 75
Note:
See TracChangeset
for help on using the changeset viewer.