Add xisdnload example scripts

Take fom Debian sid

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
This commit is contained in:
Karsten Keil 2012-02-25 15:30:11 +01:00
parent dce2c7ee85
commit d4c28816dd
3 changed files with 45 additions and 5 deletions

View File

@ -1,15 +1,16 @@
XISDNLoad.geometry: 250x100
*Label*Justify: left
*Label*Label: %7s %3d:%02d %4.0fcps %ldkB - %-100s
! *Label*Label: %7s %3d:%02d %4.0fcps %ldkB - %-100s
*Label*Label: %7s %3d:%02d %4.0fcps %ldkB
! *minScale: 8
*minScale: 1
*minScale: 2
*JumpScroll: 1
*update: 1
*internalBorderWidth: 0
*showGrip: FALSE
*onlineColor: red
*tryingColor: yellow
*activeColor: green
! *activate: sudo route add default dev isdn2 &
! *deactivate: sudo route del default ; root isdnctrl hangup isdn2 &
*activeColor: lightgreen
*activate: /etc/isdn/xisdnload-netup &
*deactivate: /etc/isdn/xisdnload-netdown &
*number: .*

View File

@ -0,0 +1,21 @@
#!/bin/sh
# Example netdown script for xmonisdn
# Do with it what you want.
# Note that xisdnload looks at the routing table to determine if a connection
# is "up" or not:
# - if there is _ANY_ route to an isdn or ippp interface, clicking on xisdnload
# will cause the netdown script to be run.
# - if there is _NO_ route to any isdn or ippp interface, clicking on xisdnload
# will cause the netup script to be run.
#
# As the example netdown script only hangs up the connection (and leaves the
# routes alone), another click will simply try to hang up again (i.e. run this
# script again). So, putting "isdnctrl dialmode all off" here is not that
# useful, as you have to do "isdnctrl dialmode all auto" manually...
# Feel free to modify the scripts so that the routes are deleted and added.
egrep -s '^ i(sdn|ppp)' /proc/net/dev > /dev/null || exit 0
/usr/sbin/isdnctrl hangup ippp0 > /dev/null

18
xisdnload/xisdnload-netup Normal file
View File

@ -0,0 +1,18 @@
#!/bin/sh
# Example netup script for xisdnload
# Do with it what you want.
# Note that xisdnload looks at the routing table to determine if a connection
# is "up" or not:
# - if there is _ANY_ route to an isdn or ippp interface, clicking on xisdnload
# will cause the netdown script to be run.
# - if there is _NO_ route to any isdn or ippp interface, clicking on xisdnload
# will cause the netup script to be run.
#
# As the example netdown script only hangs up the connection (and leaves the
# routes alone), another click will simply try to hang up again. So, this
# netup script will never be executed...
# Feel free to modify the scripts so that the routes are deleted and added.
exit 0