#!/bin/sh stop () { killproc pppd >/dev/null 2>&1 /sbin/ifconfig dsl0 down >/dev/null 2>&1 /sbin/modprobe -r unicorn_usb_eth >/dev/null 2>&1 return $? } start() { /sbin/modprobe unicorn_usb_eth PROTOCOL=pppoatm ActivationMode=1 VPI=0 VCI=35 ENCAPS=llc-encaps >/dev/null 2>&1 [ ! "$?" = 0 ] && return $? echo "Uruchamianie modemu i lini..." sleep 32 /sbin/ifconfig dsl0 up [ ! "$?" = 0 ] && return $? echo "Uruchamianie rp-pppoe aby ustanowić połączenie" sleep 2 pppd pty 'pppoe -I dsl0 -m 1452' [ ! "$?" = 0 ] && return $? return 0 } case "$1" in stop) stop ;; start) start ;; restart) stop start ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac RETVAL=$? if [ $RETVAL = 0 ]; then echo success else echo failure fi echo exit $RETVAL