[Bug 372358] Re: Please merge openvpn 2.1~rc15-1 (main) from Debian unstable (main)

Mathias Gug mathiaz at ubuntu.com
Thu May 14 18:48:00 BST 2009


Thanks for the diff. It seems that there is one part of the merge in the
init script that should properly handled:

Debian changed the way openvpn daemons are started:
 
-    # Check to see if it's already started...
-    if test -e /var/run/openvpn.$NAME.pid ; then
-      log_failure_msg "Already running (PID file exists)"
-      STATUS=0
-    else
-      $DAEMON $OPTARGS --writepid /var/run/openvpn.$NAME.pid \
-             $DAEMONARG $STATUSARG --cd $CONFIG_DIR \
-             --config $CONFIG_DIR/$NAME.conf || STATUS=1
-    fi
+    start-stop-daemon --start --quiet --oknodo \
+        --pidfile /var/run/openvpn.$NAME.pid \
+        --exec $DAEMON -- $OPTARGS --writepid /var/run/openvpn.$NAME.pid \
+        $DAEMONARG $STATUSARG --cd $CONFIG_DIR \
+        --config $CONFIG_DIR/$NAME.conf || STATUS=1
 }

Ubuntu used to modify the way the daemon were started:

+    STATUS=0
     # Check to see if it's already started...
     if test -e /var/run/openvpn.$NAME.pid ; then
       log_failure_msg "Already running (PID file exists)"
-      STATUS=0
     else
       $DAEMON $OPTARGS --writepid /var/run/openvpn.$NAME.pid \
-             $DAEMONARG $STATUSARG --cd $CONFIG_DIR \
-             --config $CONFIG_DIR/$NAME.conf || STATUS=1
+      $DAEMONARG $STATUSARG --cd $CONFIG_DIR \
+      --config $CONFIG_DIR/$NAME.conf $script_security < /dev/null || STATUS=1
     fi
+    log_end_msg $STATUS

However in the proposed merge, the old Debian behavior is restored:

-    start-stop-daemon --start --quiet --oknodo \
-        --pidfile /var/run/openvpn.$NAME.pid \
-        --exec $DAEMON -- $OPTARGS --writepid /var/run/openvpn.$NAME.pid \
-        $DAEMONARG $STATUSARG --cd $CONFIG_DIR \
-        --config $CONFIG_DIR/$NAME.conf || STATUS=1
+    STATUS=0
+    # Check to see if it's already started...
+    if test -e /var/run/openvpn.$NAME.pid ; then
+      log_failure_msg "Already running (PID file exists)"
+    else
+      $DAEMON $OPTARGS --writepid /var/run/openvpn.$NAME.pid \
+      $DAEMONARG $STATUSARG --cd $CONFIG_DIR \
+      --config $CONFIG_DIR/$NAME.conf $script_security < /dev/null || STATUS=1
+    fi
+    log_end_msg $STATUS

Could the Ubuntu changes be ported to the new way Debian uses to start
daemon?

-- 
Please merge openvpn 2.1~rc15-1 (main) from Debian unstable (main)
https://bugs.launchpad.net/bugs/372358
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openvpn in ubuntu.



More information about the Ubuntu-server-bugs mailing list