Changeset 8250871


Ignore:
Timestamp:
Sep 3, 2006, 11:06:10 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:
2c088b4
Parents:
18d0acd
Message:

r5529@server: jim | 2006-09-03 23:05:37 -0700
Add a check to see if the interface is already disabled

Location:
bootscripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/Changelog

    r18d0acd r8250871  
    1 n/a - September 2, 2006
     1jim - September 2, 2006
     2        * Add a check to see if the interface is already disabled
     3
     4jim - September 2, 2006
    25        * Add a check to see if the interface is already setup
    36
  • bootscripts/lfs/sysconfig/network-devices/ifdown

    r18d0acd r8250871  
    6565                # This will run the service script, if SERVICE is set
    6666                if [ -n "${SERVICE}" -a -x "${network_devices}/services/${SERVICE}" ]; then
    67                         if ip link show ${1} > /dev/null 2>&1
    68                         then
    69                                 IFCONFIG=${file} ${network_devices}/services/${SERVICE} ${1} down
     67                        TEST="`ip addr show ${1} | grep inet | cut -f1 -d'/' | cut -f2 -d't' | cut -f2 -d' '`"
     68                        if [ -z "$TEST" ]; then
     69                                boot_mesg "Interface ${1} already disabled." ${WARNING}
     70                                echo_warning
     71                                continue
    7072                        else
    71                                 boot_mesg "Interface ${1} doesn't exist." ${WARNING}
    72                                 echo_warning
     73                                if ip link show ${1} > /dev/null 2>&1; then
     74                                        IFCONFIG=${file} ${network_devices}/services/${SERVICE} ${1} down
     75                                else
     76                                        boot_mesg "Interface ${1} doesn't exist." ${WARNING}
     77                                        echo_warning
     78                                fi
    7379                        fi
    7480                else
Note: See TracChangeset for help on using the changeset viewer.