summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup/speedtouch/files/speedtch-hotplug')
-rw-r--r--net-dialup/speedtouch/files/speedtch-hotplug29
1 files changed, 29 insertions, 0 deletions
diff --git a/net-dialup/speedtouch/files/speedtch-hotplug b/net-dialup/speedtouch/files/speedtch-hotplug
new file mode 100644
index 000000000000..20325894c546
--- /dev/null
+++ b/net-dialup/speedtouch/files/speedtch-hotplug
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+echo "${REMOVER}" | grep '0$'
+
+if [ $? -eq 0 ]; then
+
+ case "$ACTION" in
+ add)
+ cat > "${REMOVER}" <<-EOF
+ #!/bin/sh
+
+ /etc/init.d/speedtouch stop
+ /sbin/lsmod | grep -q "^speedtch"
+ if [ \$? -eq 0 ]; then
+ #wait for pppd to exit
+ sleep 20
+ /sbin/rmmod speedtch
+ fi
+ EOF
+
+ /bin/chmod +x "${REMOVER}"
+ /etc/init.d/speedtouch start
+ ;;
+ esac
+
+fi
+
+exit 0
+