Changeset efc99f2 for bootscripts/clfs/sysconfig/network-devices/ifup
- 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/ifup
r0928ac4 refc99f2 61 61 fi 62 62 63 # This will allow us to assign subinterfaces to our primary 64 if [ "${INTERFACE}" != "" ]; then 65 NET_IF=${INTERFACE} 66 else 67 NET_IF=${1} 68 fi 69 63 70 if [ -n "${SERVICE}" -a -x "${network_devices}/services/${SERVICE}" ]; then 64 71 if [ -z "${CHECK_LINK}" -o "${CHECK_LINK}" = "y" -o "${CHECK_LINK}" = "yes" -o "${CHECK_LINK}" = "1" ]; then 65 TEST="`ip addr show ${ 1} | grep inet| cut -f1 -d'/' | cut -f2 -d't' | cut -f2 -d' '`"72 TEST="`ip addr show ${NET_IF} | grep inet | grep ${NET_IF} | cut -f1 -d'/' | cut -f2 -d't' | cut -f2 -d' '`" 66 73 if [ "$TEST" != "" ]; then 67 boot_mesg "Interface ${ 1} already configured with IP ${TEST}." ${WARNING}74 boot_mesg "Interface ${NET_IF} already configured with IP ${TEST}." ${WARNING} 68 75 echo_warning 69 76 continue 70 77 else 71 if ip link show ${ 1} > /dev/null 2>&1; then72 link_status=`ip link show ${ 1} 2> /dev/null | grep ${1}`78 if ip link show ${NET_IF} > /dev/null 2>&1; then 79 link_status=`ip link show ${NET_IF} 2> /dev/null | grep ${NET_IF}` 73 80 if [ -n "${link_status}" ]; then 74 81 if ! echo "${link_status}" | grep -q UP; then 75 ip link set ${ 1} up82 ip link set ${NET_IF} up 76 83 fi 77 84 fi 78 85 else 79 boot_mesg "Interface ${ 1} doesn't exist." ${WARNING}86 boot_mesg "Interface ${NET_IF} doesn't exist." ${WARNING} 80 87 echo_warning 81 88 continue … … 83 90 fi 84 91 fi 85 IFCONFIG=${file} ${network_devices}/services/${SERVICE} ${ 1} up92 IFCONFIG=${file} ${network_devices}/services/${SERVICE} ${NET_IF} up 86 93 else 87 94 boot_mesg "Unable to process ${file}. Either" ${FAILURE}
Note:
See TracChangeset
for help on using the changeset viewer.