diff options
author | Oleksandr Natalenko | 2015-06-08 13:01:56 +0300 |
---|---|---|
committer | Oleksandr Natalenko | 2015-06-08 13:01:56 +0300 |
commit | 85e54864f19f49ccb34c0079407c6dab38311ac1 (patch) | |
tree | c76bf494444604a912b2102d19fefb3af60eaf83 | |
download | aur-85e54864f19f49ccb34c0079407c6dab38311ac1.tar.gz |
initial import
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | vpnc | 21 | ||||
-rw-r--r-- | vpnc.profile | 4 |
4 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5317286ca7fe --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = netctl-vpnc + pkgdesc = VPNC support for netctl + pkgver = 20130521 + pkgrel = 1 + url = http://www.archlinux.org + arch = any + license = GPL + depends = netctl + depends = vpnc + source = vpnc.profile + source = vpnc + md5sums = c29a06961b7e8d48cc854c29f4219e77 + md5sums = a7992c43b6e2ee8806773181e317afaf + sha256sums = c463f7db0928be90b97988d992ace61b476a8c4c3e8eedc5be33a2393c81ed46 + sha256sums = 7cb902b19474b9842584e7b4f0f2146a1f11c89c29d3737013816bcecd0b756e + +pkgname = netctl-vpnc + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b05b120576e6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,20 @@ +# Maintainer: Oleksandr Natalenko aka post-factum <oleksandr@natalenko.name> +# Original author: xduugu +pkgname=netctl-vpnc +pkgver=20130521 +pkgrel=1 +pkgdesc="VPNC support for netctl" +arch=(any) +url="http://www.archlinux.org" +license=('GPL') +depends=(netctl vpnc) +source=(vpnc.profile vpnc) +md5sums=('c29a06961b7e8d48cc854c29f4219e77' + 'a7992c43b6e2ee8806773181e317afaf') +sha256sums=('c463f7db0928be90b97988d992ace61b476a8c4c3e8eedc5be33a2393c81ed46' + '7cb902b19474b9842584e7b4f0f2146a1f11c89c29d3737013816bcecd0b756e') + +package() { + install -Dm644 "$srcdir/vpnc.profile" "$pkgdir/etc/netctl/examples/vpnc" + install -Dm755 "$srcdir/vpnc" "$pkgdir/usr/lib/network/connections/vpnc" +} @@ -0,0 +1,21 @@ +#! /bin/bash + +vpnc_up() { + VpncConfig="${VpncConfig:-/etc/vpnc/default.conf}" + VpncFlags="${VpncFlags:-}" + + if ! /usr/bin/vpnc $VpncFlags "$VpncConfig"; then + report_error "Establishing vpnc connection failed." + return 1 + fi +} + +vpnc_down() { + if ! /usr/bin/vpnc-disconnect; then + report_error "Could not disconnect vpnc connection. Trying to kill process." + if ! pkill -9 -x vpnc &>/dev/null; then + report_error "Unable to terminate or find vpnc process." + fi + return 1 + fi +} diff --git a/vpnc.profile b/vpnc.profile new file mode 100644 index 000000000000..71d1cd6eeacf --- /dev/null +++ b/vpnc.profile @@ -0,0 +1,4 @@ +Connection=vpnc +Interface=vpnc +VpncConfig="/etc/vpnc/default.conf" +VpncFlags="" |