SVN: rc-scripts/trunk/sysconfig/network-scripts/ifup

gotar gotar at pld-linux.org
Sun Mar 8 16:48:01 CET 2009


Author: gotar
Date: Sun Mar  8 16:48:00 2009
New Revision: 10176

Modified:
   rc-scripts/trunk/sysconfig/network-scripts/ifup
Log:
- rc.d/init.d/network calls "/sbin/ifup tnlcfg-$i boot" causing
awk: cannot open tnlcfg-tun0 (No such file or directory)
  from ifup-post tnlcfg-tun0 (calling ifup-aliases without full $CONFIG path)
  This fixes long lasting bug:
http://www.mail-archive.com/pld-devel-pl@lists.pld-linux.org/msg18413.html
http://www.mail-archive.com/pld-devel-pl@lists.pld-linux.org/msg11198.html


Modified: rc-scripts/trunk/sysconfig/network-scripts/ifup
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/ifup	(original)
+++ rc-scripts/trunk/sysconfig/network-scripts/ifup	Sun Mar  8 16:48:00 2009
@@ -39,6 +39,8 @@
 
 if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ]; then
 	CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
+elif [ -f "/etc/sysconfig/interfaces/$DEV" ]; then
+	CONFIG="/etc/sysconfig/interfaces/$DEV"
 else
 	CONFIG="$DEV"
 fi
@@ -225,7 +227,7 @@
 if is_yes "$ENABLE_6TO4"; then
 	# find an usable IPv4 address for this device; might have been obtained by dhcp or ppp
 	for ipv4 in `/sbin/ip addr show dev $DEVICE | awk -F'[ /]+' '/ inet /{print $3}'`; do
-		if [   `ipcalc -n $ipv4/8`  != "NETWORK=10.0.0.0"    \
+		if [       `ipcalc -n $ipv4/8`  != "NETWORK=10.0.0.0"    \
 			-a `ipcalc -n $ipv4/12` != "NETWORK=172.16.0.0"  \
 			-a `ipcalc -n $ipv4/24` != "NETWORK=192.168.0.0" \
 			-a `ipcalc -n $ipv4/24` != "NETWORK=169.254.0.0" ]; then
@@ -234,8 +236,8 @@
 			break
 		fi
 	done
-	if [ -n "$local_ipv4" ]; then   # we have an usable IPv4 address; set up the tunnel
-		tun6to4=tun6to4_$DEVICE 
+	if [ -n "$local_ipv4" ]; then	# we have an usable IPv4 address; set up the tunnel
+		tun6to4=tun6to4_$DEVICE
 		/sbin/ip tunnel add $tun6to4 mode sit ttl 128 remote any local $local_ipv4
 		/sbin/ip link set dev $tun6to4 up
 		/sbin/ip -6 addr  add $local_ipv6/16 dev $tun6to4


More information about the pld-cvs-commit mailing list