Portál AbcLinuxu, 12. května 2025 07:43
#! /bin/sh # /usr/start_cdma # touch /var/lock/start_cdma case "$1" in start) # v pripade ze je nainstalovany hotplug mknod /dev/ttyACM0 c 166 0 chgrp uucp /dev/ttyACM0 ln -s /dev/ttyACM0 /dev/modem mknod /dev/ppp c 108 0 echo "Spoustim pripojeni modemu" modprobe eurotel_cdma while true; do { lsusb > /tmp/eurotel_cdma.usbdump if { grep "CDMA Wireless Modem" /tmp/eurotel_cdma.usbdump > /dev/null; } then { echo "pppd not running, starting pppd" pppd call eurotel_cdma nodetach; # pppd call eurotel_cdma; sleep 10; } else { echo "Modem nejede" sleep 10; } fi } done ;; *) echo "Pouziti: /etc/init.d/local_start {start}" exit 1 ;; esac exit 0
man 8 pppd
?
lcp-echo-failure n
If this option is given, pppd will presume the peer to be dead if n LCP echo-requests are sent without receiving a valid LCP echo-reply. If this happens, pppd will terminate the connection. Use of this option requires a non-zero value for the lcp-echo-interval parameter. This option can be used to enable pppd to terminate after the physical connection has been broken (e.g., the modem has hung up) in situations where no hardware modem control lines are available.
lcp-echo-interval n
If this option is given, pppd will send an LCP echo-request frame to the peer every n seconds. Normally the peer should respond to the echo-request by sending an echo-reply. This option can be used with the lcp-echo-failure option to detect that the peer is no longer connected.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.