Author: jim
Date: 2006-09-04 01:48:18 -0600 (Mon, 04 Sep 2006)
New Revision: 2395
Modified:
/
trunk/bootscripts/
trunk/bootscripts/Changelog
trunk/bootscripts/lfs/sysconfig/network-devices/ifdown
Log:
[EMAIL PROTECTED] (orig r2533): jim | 2006-09-03 23:06:10 -0700
[EMAIL PROTECTED]: jim | 2006-09-03 23:05:37 -0700
Add a check to see if the interface is already disabled
Property changes on:
___________________________________________________________________
Name: svk:merge
- b6734a72-470d-0410-b049-f317dca95413:/:2532
+ b6734a72-470d-0410-b049-f317dca95413:/:2533
Property changes on: trunk/bootscripts
___________________________________________________________________
Name: svk:merge
- 38c7b366-470d-0410-a457-935707c16d9b:/bootscripts:5521
3949c430-d905-0410-97b6-f115d20341b5:/bootscripts:1331
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/bootscripts:1109
+ 38c7b366-470d-0410-a457-935707c16d9b:/bootscripts:5529
3949c430-d905-0410-97b6-f115d20341b5:/bootscripts:1331
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/bootscripts:1109
Modified: trunk/bootscripts/Changelog
===================================================================
--- trunk/bootscripts/Changelog 2006-09-03 07:48:42 UTC (rev 2394)
+++ trunk/bootscripts/Changelog 2006-09-04 07:48:18 UTC (rev 2395)
@@ -1,4 +1,7 @@
-n/a - September 2, 2006
+jim - September 2, 2006
+ * Add a check to see if the interface is already disabled
+
+jim - September 2, 2006
* Add a check to see if the interface is already setup
jim - August 27, 2006
Modified: trunk/bootscripts/lfs/sysconfig/network-devices/ifdown
===================================================================
--- trunk/bootscripts/lfs/sysconfig/network-devices/ifdown 2006-09-03
07:48:42 UTC (rev 2394)
+++ trunk/bootscripts/lfs/sysconfig/network-devices/ifdown 2006-09-04
07:48:18 UTC (rev 2395)
@@ -64,12 +64,18 @@
# This will run the service script, if SERVICE is set
if [ -n "${SERVICE}" -a -x
"${network_devices}/services/${SERVICE}" ]; then
- if ip link show ${1} > /dev/null 2>&1
- then
- IFCONFIG=${file}
${network_devices}/services/${SERVICE} ${1} down
+ TEST="`ip addr show ${1} | grep inet | cut -f1 -d'/' |
cut -f2 -d't' | cut -f2 -d' '`"
+ if [ -z "$TEST" ]; then
+ boot_mesg "Interface ${1} already disabled."
${WARNING}
+ echo_warning
+ continue
else
- boot_mesg "Interface ${1} doesn't exist."
${WARNING}
- echo_warning
+ if ip link show ${1} > /dev/null 2>&1; then
+ IFCONFIG=${file}
${network_devices}/services/${SERVICE} ${1} down
+ else
+ boot_mesg "Interface ${1} doesn't
exist." ${WARNING}
+ echo_warning
+ fi
fi
else
boot_mesg -n "Unable to process ${file}. Either"
${FAILURE}
--
http://linuxfromscratch.org/mailman/listinfo/cross-lfs
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page