updated on Mon Jan 16 12:07:49 UTC 2012
[aur-mirror.git] / ppp-alt / ppp-2.3.11-alt-scripts-fixes.patch
blob3bb59ce598d8bb3ea8f2617f1a22474802ab3ab4
1 --- ppp.orig/scripts/ipv6-up.sample Mon Aug 23 10:07:07 1999
2 +++ ppp/scripts/ipv6-up.sample Thu Jul 13 19:16:26 2000
3 @@ -8,26 +8,27 @@
4 # Start router advertisements on this link.
5 # Based on radvd 0.5.0 behaviour
7 -DEVICE=$1
8 +DEVICE="$1"
10 -CFGFILE=/usr/inet6/etc/radvd.conf-$DEVICE
11 -PIDFILE=/var/run/radvd-$DEVICE.pid
12 +CFGFILE="/usr/inet6/etc/radvd.conf-$DEVICE"
13 +PIDFILE="/var/run/radvd-$DEVICE.pid"
14 +EXEFILE="/usr/inet6/sbin/radvd"
16 -if [ -x /usr/inet6/sbin/radvd && -f $CFGFILE ]; then
17 - touch $PIDFILE
18 - if [ ! -f $PIDFILE ]; then
19 +if [ -x "$EXEFILE" -a -f "$CFGFILE" ]; then
20 + touch "$PIDFILE"
21 + if [ ! -f "$PIDFILE" ]; then
22 echo "error: $PIDFILE is not a regular file. Aborting"
23 exit 0
26 - PID=`cat $PIDFILE`
27 - if [ "$PID" != "" ]; then
28 - ps h $PID >/dev/null 2>&1 && exit 0
29 + PID="$(cat "$PIDFILE")"
30 + if [ -n "$PID" ]; then
31 + ps h "$PID" &> /dev/null && exit 0
34 # radvd 0.5.0 doesn't write a pid-file so we do it here
35 # enabling debugging keeps radvd in foreground, putting it
36 # on background gives us the PID.
37 - /usr/inet6/sbin/radvd -d 1 -C $CFGFILE &
38 - echo $! >$PIDFILE
39 + "$EXEFILE" -d 1 -C "$CFGFILE" &
40 + echo $! >"$PIDFILE"
42 --- ppp.orig/scripts/pon 2002-11-25 02:30:44 +0300
43 +++ ppp/scripts/pon 2003-10-08 19:27:03 +0400
44 @@ -1,10 +1,12 @@
45 #!/bin/sh
47 +PPP_ON_BOOT=/etc/ppp/ppp_on_boot
49 case "$1" in
50 -*) echo "
51 Usage: pon [provider] [arguments]
53 -If pon is invoked without arguments, /etc/ppp/ppp_on_boot file will be
54 +If pon is invoked without arguments, $PPP_ON_BOOT file will be
55 run, presuming it exists and is executable. Otherwise, a PPP connection
56 will be started using settings from /etc/ppp/peers/provider.
57 If you specify one argument, a PPP connection will be started using
58 @@ -16,8 +18,8 @@
60 esac
62 -if [ -z "$1" -a -x /etc/ppp/ppp_on_boot ]; then
63 - exec /etc/ppp/ppp_on_boot
64 +if [ -z "$1" -a -x "$PPP_ON_BOOT" ]; then
65 + exec "$PPP_ON_BOOT"
68 if [ -z "$1" -a ! -f /etc/ppp/peers/provider ]; then