From 164df2fdcc8ac4286c7f8f04f1e7c9004ade6960 Mon Sep 17 00:00:00 2001 From: James Rayner Date: Thu, 18 Dec 2008 16:33:31 +1100 Subject: fix libify --- src/connections/ppp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/connections/ppp (limited to 'src/connections/ppp') diff --git a/src/connections/ppp b/src/connections/ppp new file mode 100644 index 0000000..ecefd63 --- /dev/null +++ b/src/connections/ppp @@ -0,0 +1,18 @@ +#! /bin/bash +ppp_up() { + [[ -z "$PEER" ]] && PEER="provider" + [[ -z "$PPP_TIMEOUT" ]] && PPP_TIMEOUT=30 + + /usr/sbin/pppd call $PEER updetach child-timeout $PPP_TIMEOUT linkname $PEER + + if [[ $? -ne 0 ]]; then + err_append "pppd connection failed" + exit 1 + fi +} + +ppp_down() { + kill $(head -1 /var/run/ppp-$(basename $PEER).pid) +} + +# vim: set ts=4 et sw=4: -- cgit v1.2.3-24-g4f1b