From: <dha...@us...> - 2006-08-08 07:09:24
|
Revision: 203 Author: dhartman Date: 2006-08-08 00:09:11 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/astlinux/?rev=203&view=rev Log Message: ----------- acpid init fix, openvpn init script Modified Paths: -------------- branches/dhartman/package/acpid/acpid.init Added Paths: ----------- branches/dhartman/package/openvpn/openvpn.init branches/dhartman/target/generic/target_skeleton/etc/openvpn.conf branches/dhartman/target/generic/target_skeleton/etc/runlevels/default/K26openvpn branches/dhartman/target/generic/target_skeleton/etc/runlevels/default/S14openvpn Modified: branches/dhartman/package/acpid/acpid.init =================================================================== --- branches/dhartman/package/acpid/acpid.init 2006-08-07 14:44:05 UTC (rev 202) +++ branches/dhartman/package/acpid/acpid.init 2006-08-08 07:09:11 UTC (rev 203) @@ -29,7 +29,6 @@ ;; init) -init start ;; Added: branches/dhartman/package/openvpn/openvpn.init =================================================================== --- branches/dhartman/package/openvpn/openvpn.init (rev 0) +++ branches/dhartman/package/openvpn/openvpn.init 2006-08-08 07:09:11 UTC (rev 203) @@ -0,0 +1,86 @@ +#!/bin/sh +. /etc/rc.conf + +init () { +#check for existing of tun adapter +if [ -e /dev/net/tun ] +then +echo "Tun device was found." +else +echo "No tun device found. We'll make one now." +mkdir /dev/net +mknod /dev/net/tun c 10 200 +modprobe tun +fi + +echo "Creating OpenVPN config files" +echo "#openvpn.conf created from rc.conf settings dynamically at boot +dev $OVPN_DEV +proto $OVPN_PROTOCOL +ca $OVPN_CA +cert $OVPN_CERT +key $OVPN_KEY +dh $OVPN_DH +server $OVPN_SERVER +verb $OVPN_VERBOSITY +push \"$OVPN_PUSH1 $OVPN_PUSH2 $OVPN_PUSH3\"" > /tmp/etc/openvpn.conf + +echo "#static setting--modify openvpn init script to change +port 1194 +ifconfig-pool-persist /etc/openvpn/ipp.txt +user nobody +group nobody +persist-key +persist-tun +status /var/log/openvpn-status.log +log-append /var/log/openvpn.log +daemon" >> /tmp/etc/openvpn.conf + +} + +start () { +if [ $VPN -a $VPN = "raccoon" ] +then +echo "You have selected raccoon for your VPN service. Configure manually." +fi + +if [ $VPN -a $VPN = "openvpn" ] +then +echo "Starting OpenVPN with settings from /etc/openvpn" +/usr/sbin/openvpn /etc/openvpn.conf +fi +} + +stop () { +echo "Stopping OpenVPN" +killall openvpn +} + +case $1 in + +start) +start +;; + +stop) +stop +;; + +init) +init +start +;; + +restart) +stop +sleep 2 +start +;; + +*) +echo "Usage: start|stop|restart" +;; + +esac + + Property changes on: branches/dhartman/package/openvpn/openvpn.init ___________________________________________________________________ Name: svn:executable + * Added: branches/dhartman/target/generic/target_skeleton/etc/openvpn.conf =================================================================== --- branches/dhartman/target/generic/target_skeleton/etc/openvpn.conf (rev 0) +++ branches/dhartman/target/generic/target_skeleton/etc/openvpn.conf 2006-08-08 07:09:11 UTC (rev 203) @@ -0,0 +1 @@ +link /tmp/etc/openvpn.conf \ No newline at end of file Property changes on: branches/dhartman/target/generic/target_skeleton/etc/openvpn.conf ___________________________________________________________________ Name: svn:special + * Added: branches/dhartman/target/generic/target_skeleton/etc/runlevels/default/K26openvpn =================================================================== --- branches/dhartman/target/generic/target_skeleton/etc/runlevels/default/K26openvpn (rev 0) +++ branches/dhartman/target/generic/target_skeleton/etc/runlevels/default/K26openvpn 2006-08-08 07:09:11 UTC (rev 203) @@ -0,0 +1 @@ +link ../../init.d/openvpn \ No newline at end of file Property changes on: branches/dhartman/target/generic/target_skeleton/etc/runlevels/default/K26openvpn ___________________________________________________________________ Name: svn:special + * Added: branches/dhartman/target/generic/target_skeleton/etc/runlevels/default/S14openvpn =================================================================== --- branches/dhartman/target/generic/target_skeleton/etc/runlevels/default/S14openvpn (rev 0) +++ branches/dhartman/target/generic/target_skeleton/etc/runlevels/default/S14openvpn 2006-08-08 07:09:11 UTC (rev 203) @@ -0,0 +1 @@ +link ../../init.d/openvpn \ No newline at end of file Property changes on: branches/dhartman/target/generic/target_skeleton/etc/runlevels/default/S14openvpn ___________________________________________________________________ Name: svn:special + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |