From a5c52c00c16be69e14360222520129d30f76e042 Mon Sep 17 00:00:00 2001 From: Olav Vitters Date: Thu, 30 Jul 2020 22:10:35 +0200 Subject: 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. --- mandriva/vpn/Makefile | 14 -------------- mandriva/vpn/vpn-ifdown | 8 -------- mandriva/vpn/vpn-ifup | 8 -------- mandriva/vpn/vpn-start | 36 ------------------------------------ mandriva/vpn/vpn-stop | 18 ------------------ 5 files changed, 84 deletions(-) delete mode 100644 mandriva/vpn/Makefile delete mode 100755 mandriva/vpn/vpn-ifdown delete mode 100755 mandriva/vpn/vpn-ifup delete mode 100755 mandriva/vpn/vpn-start delete mode 100755 mandriva/vpn/vpn-stop (limited to 'mandriva/vpn') 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: [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: " -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 -- cgit v1.2.1