This is a discussion on reconnect with Alcaltel Speedtouch USB modem within the Linux Networking forums, part of the Linux Forums category; Hi there, I have adsl, and connect using the Alcatel Speedtouch USB modem (the frog). I have it successfully working ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi there,
I have adsl, and connect using the Alcatel Speedtouch USB modem (the frog). I have it successfully working just now, but dont know how to make it reconnect if the connection goes down. At the moment, I have a script which detects if the connection is down and if so, makes the machine reboot. I dont want this to happen, does anybody know how to make it reconnect? Thanks Allan |
|
|||
|
"Allan Bruce" <allanmb@TAKEAWAYf2s.com> wrote in message
news:boe01j$95n$1@news.freedom2surf.net... > Hi there, > > I have adsl, and connect using the Alcatel Speedtouch USB modem (the frog). > I have it successfully working just now, but dont know how to make it > reconnect if the connection goes down. At the moment, I have a script which > detects if the connection is down and if so, makes the machine reboot. I > dont want this to happen, does anybody know how to make it reconnect? Are you having to manually set up the device on boot? If so, just create a script that first looks to see if it is already active, kills it if the system "thinks" it's active, then performs the same sequence to restart it. Without knowing more, that's about all I can suggest. JW |
|
|||
|
"Jacob Westenbach" <westy528@yahoo.com> wrote in message news:yRvqb.4345$PH6.604@twister.austin.rr.com... > "Allan Bruce" <allanmb@TAKEAWAYf2s.com> wrote in message > news:boe01j$95n$1@news.freedom2surf.net... > > Hi there, > > > > I have adsl, and connect using the Alcatel Speedtouch USB modem (the > frog). > > I have it successfully working just now, but dont know how to make it > > reconnect if the connection goes down. At the moment, I have a script > which > > detects if the connection is down and if so, makes the machine reboot. I > > dont want this to happen, does anybody know how to make it reconnect? > > Are you having to manually set up the device on boot? If so, just create a > script that first looks to see if it is already active, kills it if the > system "thinks" it's active, then performs the same sequence to restart it. > Without knowing more, that's about all I can suggest. > > JW > > I havent set it up manually - It was recognised as part of the Mandrake (9.1) installation. All I had to do was chose to activate it on startup. I have this in my /etc/rc3.d/S11internet .. /etc/rc.d/init.d/functions case "$1" in start) if [ -e /etc/sysconfig/network-scripts/net_cnx_up ]; then action "Checking internet connections to start at boot" "/etc/sysconfig/network-scripts/net_cnx_up --boot_time" else action "No connection to start" "true" fi touch /var/lock/subsys/internet ;; stop) if [ -e /etc/sysconfig/network-scripts/net_cnx_down ]; then action "Stopping internet connection if needed: " "/etc/sysconfig/network-scripts/net_cnx_down --boot_time" else action "No connection to stop" "true" fi rm -f /var/lock/subsys/internet ;; restart) $0 stop echo "Waiting 10 sec before restarting the internet connection." sleep 10 $0 start ;; status) ;; *) echo "Usage: internet {start|stop|status|restart}" exit 1 esac exit 0 can I just "restart" the dameon do you think? Thanks Allan |
|
|||
|
"Allan Bruce" <allanmb@TAKEAWAYf2s.com> wrote in message
news:boe4hg$aga$1@news.freedom2surf.net... > > "Jacob Westenbach" <westy528@yahoo.com> wrote in message > news:yRvqb.4345$PH6.604@twister.austin.rr.com... > > "Allan Bruce" <allanmb@TAKEAWAYf2s.com> wrote in message > > news:boe01j$95n$1@news.freedom2surf.net... > > > Hi there, > > > > > > I have adsl, and connect using the Alcatel Speedtouch USB modem (the > > frog). > > > I have it successfully working just now, but dont know how to make it > > > reconnect if the connection goes down. At the moment, I have a script > > which > > > detects if the connection is down and if so, makes the machine reboot. > I > > > dont want this to happen, does anybody know how to make it reconnect? > > > > Are you having to manually set up the device on boot? If so, just create > a > > script that first looks to see if it is already active, kills it if the > > system "thinks" it's active, then performs the same sequence to restart > it. > > Without knowing more, that's about all I can suggest. > > > > JW > > > > > > I havent set it up manually - It was recognised as part of the Mandrake > (9.1) installation. All I had to do was chose to activate it on startup. I > have this in my /etc/rc3.d/S11internet > > . /etc/rc.d/init.d/functions > > case "$1" in > start) > if [ -e /etc/sysconfig/network-scripts/net_cnx_up ]; then > action "Checking internet connections to start at > boot" "/etc/sysconfig/network-scripts/net_cnx_up --boot_time" > else > action "No connection to start" "true" > fi > touch /var/lock/subsys/internet > ;; > stop) > if [ -e /etc/sysconfig/network-scripts/net_cnx_down ]; then > action "Stopping internet connection if needed: " > "/etc/sysconfig/network-scripts/net_cnx_down --boot_time" > else > action "No connection to stop" "true" > fi > rm -f /var/lock/subsys/internet > ;; > restart) > $0 stop > echo "Waiting 10 sec before restarting the internet > connection." > sleep 10 > $0 start > ;; > status) > ;; > *) > echo "Usage: internet {start|stop|status|restart}" > exit 1 > esac > exit 0 > > > can I just "restart" the dameon do you think? > Thanks > Allan > > It looks that way to me. Try running the "status" command line to learn what it returns, both with and without a connection (just pull the rj45). Have your script run the status option, grep for the failed condition, and run the restart if it has failed. JW |
|
|||
|
"Jacob Westenbach" <westy528@yahoo.com> wrote in message news:ULwqb.5058$PH6.52@twister.austin.rr.com... > "Allan Bruce" <allanmb@TAKEAWAYf2s.com> wrote in message > news:boe4hg$aga$1@news.freedom2surf.net... > > > > "Jacob Westenbach" <westy528@yahoo.com> wrote in message > > news:yRvqb.4345$PH6.604@twister.austin.rr.com... > > > "Allan Bruce" <allanmb@TAKEAWAYf2s.com> wrote in message > > > news:boe01j$95n$1@news.freedom2surf.net... > > > > Hi there, > > > > > > > > I have adsl, and connect using the Alcatel Speedtouch USB modem (the > > > frog). > > > > I have it successfully working just now, but dont know how to make it > > > > reconnect if the connection goes down. At the moment, I have a script > > > which > > > > detects if the connection is down and if so, makes the machine reboot. > > I > > > > dont want this to happen, does anybody know how to make it reconnect? > > > > > > Are you having to manually set up the device on boot? If so, just > create > > a > > > script that first looks to see if it is already active, kills it if the > > > system "thinks" it's active, then performs the same sequence to restart > > it. > > > Without knowing more, that's about all I can suggest. > > > > > > JW > > > > > > > > > > I havent set it up manually - It was recognised as part of the Mandrake > > (9.1) installation. All I had to do was chose to activate it on startup. > I > > have this in my /etc/rc3.d/S11internet > > > > . /etc/rc.d/init.d/functions > > > > case "$1" in > > start) > > if [ -e /etc/sysconfig/network-scripts/net_cnx_up ]; then > > action "Checking internet connections to start at > > boot" "/etc/sysconfig/network-scripts/net_cnx_up --boot_time" > > else > > action "No connection to start" "true" > > fi > > touch /var/lock/subsys/internet > > ;; > > stop) > > if [ -e /etc/sysconfig/network-scripts/net_cnx_down ]; > then > > action "Stopping internet connection if needed: " > > "/etc/sysconfig/network-scripts/net_cnx_down --boot_time" > > else > > action "No connection to stop" "true" > > fi > > rm -f /var/lock/subsys/internet > > ;; > > restart) > > $0 stop > > echo "Waiting 10 sec before restarting the internet > > connection." > > sleep 10 > > $0 start > > ;; > > status) > > ;; > > *) > > echo "Usage: internet {start|stop|status|restart}" > > exit 1 > > esac > > exit 0 > > > > > > can I just "restart" the dameon do you think? > > Thanks > > Allan > > > > > > It looks that way to me. Try running the "status" command line to learn > what it returns, both with and without a connection (just pull the rj45). > Have your script run the status option, grep for the failed condition, and > run the restart if it has failed. > > JW > > Its working :D Thanks very much Allan |