diff options
author | Olav Vitters <olav@vitters.nl> | 2020-07-30 22:10:35 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2020-07-30 22:10:35 +0200 |
commit | a5c52c00c16be69e14360222520129d30f76e042 (patch) | |
tree | d44ff9f87b2985ead827c72c55b5aaee23c5dd10 /mandriva/vpn | |
parent | 817ca842f086f7290f183720539834263c2f1afe (diff) | |
download | initscripts-a5c52c00c16be69e14360222520129d30f76e042.tar initscripts-a5c52c00c16be69e14360222520129d30f76e042.tar.gz initscripts-a5c52c00c16be69e14360222520129d30f76e042.tar.bz2 initscripts-a5c52c00c16be69e14360222520129d30f76e042.tar.xz initscripts-a5c52c00c16be69e14360222520129d30f76e042.zip |
Align Makefile and tree structure with upstream tree structure
Instead of placing the custom files with the upstream files it seems
clearer to have them mostly separated. This makes it easier to see which
parts are custom and which parts are more or less upstream.
As a result the upstream Makefile only needed minor changes to
accomodate this. The Makefile is NOT bug free, unfortunately it doesn't
always do the right thing, this due to inexperience.
Diffstat (limited to 'mandriva/vpn')
-rw-r--r-- | mandriva/vpn/Makefile | 14 | ||||
-rwxr-xr-x | mandriva/vpn/vpn-ifdown | 8 | ||||
-rwxr-xr-x | mandriva/vpn/vpn-ifup | 8 | ||||
-rwxr-xr-x | mandriva/vpn/vpn-start | 36 | ||||
-rwxr-xr-x | mandriva/vpn/vpn-stop | 18 |
5 files changed, 0 insertions, 84 deletions
diff --git a/mandriva/vpn/Makefile b/mandriva/vpn/Makefile deleted file mode 100644 index 540414c4..00000000 --- a/mandriva/vpn/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -SH=vpn-start vpn-stop vpn-ifup vpn-ifdown -PL=partmon.pl - -all: check - -check: - @for i in $(SH);do /bin/bash -n $$i || exit 1;echo $$i syntax OK;done - -install: - mkdir -p $(ROOT)/etc/sysconfig/network-scripts/vpn.d/{openvpn,pptp,vpnc} - install -m755 vpn-start $(ROOT)/usr/sbin/ - install -m755 vpn-stop $(ROOT)/usr/sbin/ - install -m755 vpn-ifup $(ROOT)/etc/sysconfig/network-scripts/ifup.d/vpn - install -m755 vpn-ifdown $(ROOT)/etc/sysconfig/network-scripts/ifdown.d/vpn diff --git a/mandriva/vpn/vpn-ifdown b/mandriva/vpn/vpn-ifdown deleted file mode 100755 index 466e54fd..00000000 --- a/mandriva/vpn/vpn-ifdown +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ -r /etc/sysconfig/network-scripts/ifcfg-$1 ]; then - . /etc/sysconfig/network-scripts/ifcfg-$1 - if [ -n "$VPN_TYPE" ] && [ -n "$VPN_NAME" ]; then - /usr/sbin/vpn-stop $VPN_TYPE $VPN_NAME - fi -fi diff --git a/mandriva/vpn/vpn-ifup b/mandriva/vpn/vpn-ifup deleted file mode 100755 index 4425d154..00000000 --- a/mandriva/vpn/vpn-ifup +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ -r /etc/sysconfig/network-scripts/ifcfg-$1 ]; then - . /etc/sysconfig/network-scripts/ifcfg-$1 - if [ -n "$VPN_TYPE" ] && [ -n "$VPN_NAME" ]; then - /usr/sbin/vpn-start $VPN_TYPE "$VPN_NAME" - fi -fi diff --git a/mandriva/vpn/vpn-start b/mandriva/vpn/vpn-start deleted file mode 100755 index 49a02cf1..00000000 --- a/mandriva/vpn/vpn-start +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -TYPE=$1 -NAME=$2 -shift 2 -if [ -z "$TYPE" ] || [ -z "$NAME" ]; then - echo "usage: $0: <VPN type> <VPN name> [parameters]" -fi - -DIR=/etc/sysconfig/network-scripts/vpn.d/"$TYPE" -CONFIG="$DIR"/"$NAME".conf -PID=/var/run/"$TYPE"-"$NAME".pid - -. /etc/init.d/functions - -if pidofproc "$PID" >/dev/null; then - gprintf "Connection is already started, please stop it first.\n" - exit 1 -fi - -case $TYPE in - pptp) - gprintf "No implementation for connection type $TYPE yet.\n"; - exit 1 - ;; - openvpn) - action "Starting VPN connection: " openvpn --user openvpn --group openvpn --daemon --writepid $PID --config $CONFIG --cd $DIR $* - ;; - vpnc) - action "Starting VPN connection: " /usr/sbin/vpnc $CONFIG --pid-file $PID $* - ;; - *) - gprintf "Connection type $TYPE is not supported.\n"; - exit 1 - ;; -esac diff --git a/mandriva/vpn/vpn-stop b/mandriva/vpn/vpn-stop deleted file mode 100755 index 048c909f..00000000 --- a/mandriva/vpn/vpn-stop +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -TYPE=$1 -NAME=$2 -if [ -z "$TYPE" ] || [ -z "$NAME" ]; then - echo "usage: $0: <VPN type> <VPN name>" -fi - -PID=/var/run/"$TYPE"-"$NAME".pid - -. /etc/init.d/functions -if [ -e "$PID" ]; then - gprintf "Stopping VPN connection: " - killproc -p "$PID" - echo -else - gprintf "Connection isn't started.\n" -fi |