Changeset 15962fe


Ignore:
Timestamp:
Sep 2, 2006, 11:02:35 PM (18 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
c4fcf54
Parents:
3a86839
Message:

r5521@server: jim | 2006-09-02 23:02:09 -0700
Added check to make sure interface is not configured

Location:
bootscripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/Changelog

    r3a86839 r15962fe  
     1n/a - September 2, 2006
     2        * Add a check to see if the interface is already setup
     3
    14jim - August 27, 2006
    25        * Added the same change to ifdown script.
  • bootscripts/lfs/sysconfig/network-devices/ifup

    r3a86839 r15962fe  
    6363                if [ -n "${SERVICE}" -a -x "${network_devices}/services/${SERVICE}" ]; then
    6464                        if [ -z "${CHECK_LINK}" -o "${CHECK_LINK}" = "y" -o "${CHECK_LINK}" = "yes" -o "${CHECK_LINK}" = "1" ]; then
    65                                 if ip link show ${1} > /dev/null 2>&1; then
    66                                         link_status=`ip link show ${1} 2> /dev/null | grep ${1}`
    67                                         if [ -n "${link_status}" ]; then
    68                                                 if ! echo "${link_status}" | grep -q UP; then
    69                                                         ip link set ${1} up
     65                                TEST="`ip addr show ${1} | grep inet | cut -f1 -d'/' | cut -f2 -d't' | cut -f2 -d' '`"
     66                                if [ "$TEST" != "" ]; then
     67                                                boot_mesg "Interface ${1} already configured." ${WARNING}
     68                                                echo_warning
     69                                                continue
     70                                else
     71                                        if ip link show ${1} > /dev/null 2>&1; then
     72                                                link_status=`ip link show ${1} 2> /dev/null | grep ${1}`
     73                                                if [ -n "${link_status}" ]; then
     74                                                        if ! echo "${link_status}" | grep -q UP; then
     75                                                                ip link set ${1} up
     76                                                        fi
    7077                                                fi
     78                                        else
     79                                                boot_mesg "Interface ${1} doesn't exist." ${WARNING}
     80                                                echo_warning
     81                                                continue
    7182                                        fi
    72                                 else
    73                                         boot_mesg "Interface ${1} doesn't exist." ${WARNING}
    74                                         echo_warning
    75                                         continue
    7683                                fi
    7784                        fi
Note: See TracChangeset for help on using the changeset viewer.