diff options
author | James Rayner <james@archlinux.org> | 2008-12-18 06:33:31 +0100 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2008-12-18 06:33:31 +0100 |
commit | 164df2fdcc8ac4286c7f8f04f1e7c9004ade6960 (patch) | |
tree | 50e56f8711d4c7e9db7981c3c6282a994213acca /src/connections/ppp | |
parent | 300cd2c73b599c2a58463ce75e1aa2cb19ac2414 (diff) | |
download | netctl-164df2fdcc8ac4286c7f8f04f1e7c9004ade6960.tar.gz netctl-164df2fdcc8ac4286c7f8f04f1e7c9004ade6960.tar.xz |
fix libify
Diffstat (limited to 'src/connections/ppp')
-rw-r--r-- | src/connections/ppp | 18 |
1 files changed, 18 insertions, 0 deletions
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: |