46 while read intf saps sapd; do
47 if [ "$intf" ]; then
48 [ -z "$saps" ] || saps="-s $saps"
49 /usr/sbin/sppptun plumb $saps pppoe $intf
50 [ -z "$sapd" ] || sapd="-s $sapd"
51 /usr/sbin/sppptun plumb $sapd pppoed $intf
52 fi
53 done
54 fi
55 if [ -f $PPPDIR/pppoe ] && [ -x /usr/lib/inet/pppoed ]; then
56 /usr/lib/inet/pppoed >/dev/null
57 fi
58 ;;
59
60 'stop')
61 /usr/bin/pkill -z `/sbin/zonename` -x pppd && sleep 1
62 /usr/bin/pkill -z `/sbin/zonename` -x pppoed
63
64 # Use ifconfig to make the interfaces down just in case
65 if [ -f $PPPDIR/ifconfig ]; then
66 nawk '/ifconfig[ ]*sppp/ { \
67 system("ifconfig " $2 " down"); \
68 system("ifconfig " $2 " unplumb"); \
69 next; \
70 } \
71 /ifconfig/ { \
72 $3 = "removeif"; \
73 NF = 4; \
74 system($0); \
75 }' < $PPPDIR/ifconfig
76 fi
77
78 if [ -f $PPPDIR/pppoe.if ] && [ -x /usr/sbin/sppptun ]; then
79 sed -e 's/^#.*//;s/\([^\\]\)#.*/\1/;s/[ ]*$//;s/^[ ]*//' \
80 $PPPDIR/pppoe.if | \
81 while read intf rest; do
82 if [ "$intf" ]; then
83 /usr/sbin/sppptun unplumb ${intf}:pppoe
84 /usr/sbin/sppptun unplumb ${intf}:pppoed
85 fi
86 done
|
46 while read intf saps sapd; do
47 if [ "$intf" ]; then
48 [ -z "$saps" ] || saps="-s $saps"
49 /usr/sbin/sppptun plumb $saps pppoe $intf
50 [ -z "$sapd" ] || sapd="-s $sapd"
51 /usr/sbin/sppptun plumb $sapd pppoed $intf
52 fi
53 done
54 fi
55 if [ -f $PPPDIR/pppoe ] && [ -x /usr/lib/inet/pppoed ]; then
56 /usr/lib/inet/pppoed >/dev/null
57 fi
58 ;;
59
60 'stop')
61 /usr/bin/pkill -z `/sbin/zonename` -x pppd && sleep 1
62 /usr/bin/pkill -z `/sbin/zonename` -x pppoed
63
64 # Use ifconfig to make the interfaces down just in case
65 if [ -f $PPPDIR/ifconfig ]; then
66 /usr/xpg4/bin/awk '/ifconfig[ ]*sppp/ { \
67 system("ifconfig " $2 " down"); \
68 system("ifconfig " $2 " unplumb"); \
69 next; \
70 } \
71 /ifconfig/ { \
72 $3 = "removeif"; \
73 NF = 4; \
74 system($0); \
75 }' < $PPPDIR/ifconfig
76 fi
77
78 if [ -f $PPPDIR/pppoe.if ] && [ -x /usr/sbin/sppptun ]; then
79 sed -e 's/^#.*//;s/\([^\\]\)#.*/\1/;s/[ ]*$//;s/^[ ]*//' \
80 $PPPDIR/pppoe.if | \
81 while read intf rest; do
82 if [ "$intf" ]; then
83 /usr/sbin/sppptun unplumb ${intf}:pppoe
84 /usr/sbin/sppptun unplumb ${intf}:pppoed
85 fi
86 done
|