Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > by-pkgid > c0b640bf45af6e152cc4082593727b05 > files > 10

openvpn-2.2.1-1mdv2010.2.src.rpm

--- sample-scripts/openvpn.init	2011-05-21 11:12:06.771210832 +0200
+++ sample-scripts/openvpn.init.oden	2011-05-21 11:15:21.946210846 +0200
@@ -162,7 +162,12 @@
 		. $bn.sh
 	    fi
 	    rm -f $piddir/$bn.pid
-	    $openvpn --user openvpn --group openvpn --daemon --writepid $piddir/$bn.pid --config $c --cd $work
+            # Handle backward compatibility, see Red Hat Bugzilla ID #458594
+            script_security=''
+            if [ -z "$( grep '^[[:space:]]*script-security[[:space:]]' $c )" ]; then
+                script_security="--script-security 2"
+            fi
+	    $openvpn --user openvpn --group openvpn --daemon --writepid $piddir/$bn.pid --config $c --cd $work $script_security
 	    if [ $? = 0 ]; then
 		successes=1
 	    else