Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
sysconfig
sysconfig-ifup-tunnel-skip-tunnel0.bnc467165.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sysconfig-ifup-tunnel-skip-tunnel0.bnc467165.diff of Package sysconfig
--- doc/ifcfg-tunnel.5 +++ doc/ifcfg-tunnel.5 2009/01/21 20:37:16 @@ -100,7 +100,7 @@ you may choose the interface names. Create a GRE tunnel between a local computer with IP address 192.168.1.2 and a remote computer with IP address 172.16.2.3. After the tunnel is created assign an IP address 10.20.30.40 to it's local end. Default filename: -.I ifcfg-gre0 +.I ifcfg-gre1 .nf STARTMODE='onboot' BOOTPROTO='static' @@ -114,7 +114,7 @@ created assign an IP address 10.20.30.40 IPIP tunnel is created in exactly the same way, except that the variable .B TUNNEL has to be set to "ipip" in this case. Use filename -.I ifcfg-ipip0 +.I ifcfg-tunl1 in this case. .TP --- scripts/ifup-tunnel +++ scripts/ifup-tunnel 2009/01/21 21:14:09 @@ -86,8 +86,9 @@ done # if [ -f ifcfg-$CONFIG ] ; then . ifcfg-$CONFIG -else +elif test "$ACTION" != down ; then message "could not find configuration file ifcfg-$CONFIG" + exit $R_NOCONFIG fi @@ -207,15 +208,19 @@ tunctl_bin () RETVAL=$R_SUCCESS case $ACTION in up) - printf " %-9s " "$INTERFACE" - case "$INTERFACETYPE" in sit) case "$BOOTPROTO" in static|6to4) /sbin/modprobe -q sit - iptunnel_add - RETVAL=$? + case $INTERFACE in + sit0) ;; + *) + printf " %-9s " "$INTERFACE" + iptunnel_add + RETVAL=$? + ;; + esac ;; *) logerror "unsupported tunnel boot protocol $BOOTPROTO" @@ -227,11 +232,18 @@ up) case "$BOOTPROTO" in static) case "$INTERFACETYPE" in - #gre) /sbin/modprobe -q ip_gre ;; + gre) /sbin/modprobe -q ip_gre ;; ipip) /sbin/modprobe -q ipip ;; esac - iptunnel_add - RETVAL=$? + + case $INTERFACE in + gre0|tunl0) ;; + *) + printf " %-9s " "$INTERFACE" + iptunnel_add + RETVAL=$? + ;; + esac ;; *) logerror "unsupported tunnel boot protocol $BOOTPROTO" @@ -253,6 +265,7 @@ up) exit $R_ERROR fi + printf " %-9s " "$INTERFACE" $tunctl -t $INTERFACE ${TUNCTL_TYPE_ARG} \ ${TUNNEL_SET_OWNER:+-u "$TUNNEL_SET_OWNER"} \ ${TUNNEL_SET_GROUP:+-g "$TUNNEL_SET_GROUP"} \ @@ -272,8 +285,6 @@ down) case "$INTERFACETYPE" in tun|tap) - printf " %-9s " "$INTERFACE" - if [ -d /sys/class/net/$INTERFACE ] ; then tunctl=$(tunctl_bin) if [ -z "$tunctl" ] ; then @@ -281,12 +292,22 @@ down) exit $R_ERROR fi + printf " %-9s " "$INTERFACE" $tunctl -d $INTERFACE 2>&1 || RETVAL=$R_ERROR fi ;; sit|gre|ipip) - iptunnel_del - RETVAL=$? + + if [ -d /sys/class/net/$INTERFACE ] ; then + case $INTERFACE in + sit0|gre0|tunl0) ;; + *) + printf " %-9s " "$INTERFACE" + iptunnel_del + RETVAL=$? + ;; + esac + fi ;; esac ;;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor