[Bug 278766] New: specifiying up and down scripts for openvpn
https://bugzilla.novell.com/show_bug.cgi?id=278766 Summary: specifiying up and down scripts for openvpn Product: openSUSE 10.2 Version: Final Platform: 32bit OS/Version: Linux Status: NEW Severity: Enhancement Priority: P5 - None Component: Network AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: reitenbach@rapideye.de QAContact: qa@suse.de with the actual configuration it is not possible to specify up and down scripts for openvpn without editing /etc/init.d/openvpn The following patch would look for up and down scripts into /etc/openvpn/scripts for every configuration it can find in the /etc/openvpn directory. The up and down scripts have to be named like the configuration file. --- openvpn 2007-05-29 16:06:49.000000000 +0200 +++ openvpn.new 2007-05-29 16:10:40.000000000 +0200 @@ -29,6 +29,7 @@ DAEMON="OpenVPN" openvpn=/usr/sbin/openvpn confdir=/etc/openvpn +scriptdir=$confdir/scripts piddir=/var/run/openvpn test -d $piddir || mkdir $piddir @@ -74,11 +75,21 @@ for conf in $confdir/*.conf; do pidfile=$(basename ${conf%%.conf}).pid + upscript=$(basename ${conf%%.conf})_up + downscript=$(basename ${conf%%.conf})_down + if [ -x $scriptdir/$upscript ];then + SCRIPTPARAMS="--up $scriptdir/$upscript" + fi + if [ -x $scriptdir/$downscript ];then + SCRIPTPARAMS=" ${SCRIPTPARAMS} --down $scriptdir/$downscript" + fi $openvpn --daemon \ --writepid $piddir/$pidfile \ --config $conf \ --cd $confdir \ + $SCRIPTPARAMS \ || ret=false + unset SCRIPTPARAMS done # Remember status and be verbose -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=278766 mhorvath@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |mt@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=278766 mt@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from mt@novell.com 2007-06-01 02:11 MST ------- Just specify the script via "up" and "down" keywords in the config file, e.g.: up /etc/openvpn/foo.up down /etc/openvpn/foo.down -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com