n/vpnc: Added run control script.

slackware-14.2
Damien Goutte-Gattat 12 years ago
parent e0cdd5cccf
commit b91fdd8854
  1. 1
      n/vpnc/doinst.sh
  2. 33
      n/vpnc/rc.vpnc
  3. 10
      n/vpnc/vpnc.SlackBuild

@ -11,3 +11,4 @@ config()
}
config /etc/vpnc/default.conf.new
config /etc/rc.d/rc.vpnc.new

@ -0,0 +1,33 @@
#!/bin/sh
case "$1" in
start)
if ! /sbin/lsmod | grep -q tun ; then
/sbin/modinfo tun
fi
/usr/sbin/vpnc
;;
stop)
/usr/sbin/vpnc-disconnect
;;
restart)
$0 stop
sleep 2
$0 start
;;
status)
if [ -s /var/run/vpnc/pid ] && kill -0 `cat /var/run/vpnc/pid` ; then
echo "vpnc is running"
else
echo "vpnc is not running"
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2009 Damien Goutte-Gattat
# Copyright (C) 2009,2011 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -33,9 +33,8 @@ WGET=${WGET:-http://www.unix-ag.uni-kl.de/~massar/vpnc/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-vpnc}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i?86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@ -91,6 +90,9 @@ mv $PKG/etc/vpnc/default.conf $PKG/etc/vpnc/default.conf.new
# Compress man and info pages
find $PKG/usr/man -type f -exec gzip -9 {} \;
# Install run control script
install -D -m 644 $CWD/rc.vpnc $PKG/etc/rc.d/rc.vpnc.new
# Install the documentation
install -m 644 ChangeLog README TODO VERSION $PKG/usr/doc/$NAME

Loading…
Cancel
Save