]> git.pld-linux.org Git - packages/rc-scripts.git/commitdiff
- make ppp/ip-{up,down} work again
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 27 Apr 2007 23:33:11 +0000 (23:33 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- kill ugly warning if pppd was nicely killed

Changed files:
    rc-scripts-ppp-fixes.patch -> 1.1

rc-scripts-ppp-fixes.patch [new file with mode: 0644]

diff --git a/rc-scripts-ppp-fixes.patch b/rc-scripts-ppp-fixes.patch
new file mode 100644 (file)
index 0000000..eb051ca
--- /dev/null
@@ -0,0 +1,61 @@
+--- sysconfig/network-scripts/ifup-aliases.orig        2007-04-02 17:51:37.000000000 +0200
++++ sysconfig/network-scripts/ifup-aliases     2007-04-28 00:02:47.497639386 +0200
+@@ -5,6 +5,12 @@
+ # Adds all addresses of device.
+ # Called from ifup-post.
++if [ -f "/etc/sysconfig/interfaces/ifcfg-$CONFIG" ] ; then
++      CONFFILE="/etc/sysconfig/interfaces/ifcfg-$CONFIG"
++else
++      CONFFILE="$CONFIG"
++fi
++
+ # Add all addresses
+ for IP_ADDR in $IPADDR_ALIASES; do
+       IP_ADDR_OPT=""
+@@ -51,7 +57,7 @@ for IP_ADDR in $IPV6_ADDR; do
+       fi
+ done
+-for nr in $(awk 'BEGIN { max=0; }; /^IPADDR[0-9]+=/ { s = $0; gsub(/^IPADDR/, "", s); gsub(/=.*/, "", s); if (int(s) > int(max)) { max=s; }; };  END { for(j=1; j<=int(max); j++) print j } ' $CONFIG); do
++for nr in $(awk 'BEGIN { max=0; }; /^IPADDR[0-9]+=/ { s = $0; gsub(/^IPADDR/, "", s); gsub(/=.*/, "", s); if (int(s) > int(max)) { max=s; }; };  END { for(j=1; j<=int(max); j++) print j } ' $CONFFILE); do
+       eval IP_ADDR="\$IPADDR${nr}"
+       [ -z "$IP_ADDR" ] && continue
+--- sysconfig/network-scripts/ifdown-ppp.orig  2007-04-02 17:51:37.000000000 +0200
++++ sysconfig/network-scripts/ifdown-ppp       2007-04-28 01:26:43.416620054 +0200
+@@ -33,8 +33,10 @@ kill -TERM ${PID} > /dev/null 2>&1
+ sleep 2
+ [ -d /proc/${PID} ] && sleep 2 && [ -d /proc/${PID} ] && sleep 5
+-kill -KILL ${PID} > /dev/null 2>&1
+-logger -p daemon.info -t ifdown-ppp "ifdown-ppp unable to nicely kill pppd-$DEVICE (pppd-$DEVNAME)" &
++if [ -d /proc/${PID} ]; then
++      kill -KILL ${PID} > /dev/null 2>&1
++      logger -p daemon.info -t ifdown-ppp "ifdown-ppp unable to nicely kill pppd-$DEVICE (pppd-$DEVNAME)" &
++fi
+ # Special cases
+ if is_yes "${PPPOA_EAGLE}"; then
+--- ppp/ip-up.orig     2007-04-28 01:21:50.819945920 +0200
++++ ppp/ip-up  2007-04-28 01:21:23.202372084 +0200
+@@ -31,7 +31,7 @@ export PPP_IFACE PPP_TTY PPP_SPEED PPP_L
+ . /etc/rc.d/init.d/functions
+ . /etc/sysconfig/network-scripts/functions.network
+-CONFIG="$PPP_IPPARAM"
++CONFIG="ifcfg-$PPP_IPPARAM"
+ source_config
+ # as an additional convenience, $PPP_TTYNAME is set to the tty name,
+--- ppp/ip-down.orig   2007-04-02 17:51:37.000000000 +0200
++++ ppp/ip-down        2007-04-28 01:22:03.128647353 +0200
+@@ -31,7 +31,7 @@ export PPP_IFACE PPP_TTY PPP_SPEED PPP_L
+ . /etc/rc.d/init.d/functions
+ . /etc/sysconfig/network-scripts/functions.network
+-CONFIG="$PPP_IPPARAM"
++CONFIG="ifcfg-$PPP_IPPARAM"
+ source_config
+ # as an additional convienince, $PPP_TTYNAME is set to the tty name,
This page took 0.054284 seconds and 4 git commands to generate.