diff -u openvpn-2.1~rc19/debian/control openvpn-2.1~rc19/debian/control --- openvpn-2.1~rc19/debian/control +++ openvpn-2.1~rc19/debian/control @@ -1,13 +1,14 @@ Source: openvpn Section: net Priority: optional -Maintainer: Alberto Gonzalez Iniesta +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Alberto Gonzalez Iniesta Build-Depends: debhelper (>= 7), libssl-dev (>> 0.9.8g-9), liblzo2-dev, libpam0g-dev, quilt, libpkcs11-helper1-dev Standards-Version: 3.8.2 Package: openvpn Architecture: any -Depends: debconf | debconf-2.0, ${shlibs:Depends}, ${misc:Depends}, libssl0.9.8 (>= 0.9.8g-9), openssl-blacklist (>= 0.4), openvpn-blacklist +Depends: debconf | debconf-2.0, ${shlibs:Depends}, ${misc:Depends}, libssl0.9.8 (>= 0.9.8g-9), openssl-blacklist (>= 0.4), openvpn-blacklist, lsb-base (>= 3.2-14) Recommends: net-tools Suggests: openssl, resolvconf Description: virtual private network daemon diff -u openvpn-2.1~rc19/debian/openvpn.init.d openvpn-2.1~rc19/debian/openvpn.init.d --- openvpn-2.1~rc19/debian/openvpn.init.d +++ openvpn-2.1~rc19/debian/openvpn.init.d @@ -19,7 +19,7 @@ test $DEBIAN_SCRIPT_DEBUG && set -v -x DAEMON=/usr/sbin/openvpn -DESC="virtual private network daemon" +DESC="virtual private network daemon(s)" CONFIG_DIR=/etc/openvpn test -x $DAEMON || exit 0 test -d $CONFIG_DIR || exit 0 @@ -51,45 +51,55 @@ STATUSARG="--status /var/run/openvpn.$NAME.status $STATUSREFRESH" fi - log_progress_msg "$NAME" - STATUS=0 + # Handle backwards compatibility + if test -z "$( grep '^[[:space:]]*script-security[[:space:]]' $CONFIG_DIR/$NAME.conf )" ; then + script_security="--script-security 2" + 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 + 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 } stop_vpn () { kill `cat $PIDFILE` || true rm -f $PIDFILE rm -f /var/run/openvpn.$NAME.status 2> /dev/null + log_end_msg 0 } case "$1" in start) - log_daemon_msg "Starting $DESC" + log_action_begin_msg "Starting $DESC" # autostart VPNs if test -z "$2" ; then # check if automatic startup is disabled by AUTOSTART=none if test "x$AUTOSTART" = "xnone" -o -z "$AUTOSTART" ; then - log_warning_msg " Autostart disabled." + log_warning_msg " Autostart disabled, no VPN will be started." exit 0 fi if test -z "$AUTOSTART" -o "x$AUTOSTART" = "xall" ; then # all VPNs shall be started automatically for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do NAME=${CONFIG%%.conf} + log_daemon_msg " Autostarting VPN '$NAME'" start_vpn done else # start only specified VPNs for NAME in $AUTOSTART ; do if test -e $CONFIG_DIR/$NAME.conf ; then + log_daemon_msg " Autostarting VPN '$NAME'" start_vpn else - log_failure_msg "No such VPN: $NAME" + log_failure_msg " Autostarting VPN '$NAME': missing $CONFIG_DIR/$NAME.conf file !" STATUS=1 fi done @@ -98,76 +108,85 @@ else while shift ; do [ -z "$1" ] && break - if test -e $CONFIG_DIR/$1.conf ; then - NAME=$1 + NAME=$1 + if test -e $CONFIG_DIR/$NAME.conf ; then + log_daemon_msg " Starting VPN '$NAME'" start_vpn else - log_failure_msg " No such VPN: $1" + log_failure_msg " Starting VPN '$NAME': missing $CONFIG_DIR/$NAME.conf file !" STATUS=1 fi done fi - log_end_msg ${STATUS:-0} - + exit ${STATUS:-0} ;; stop) - log_daemon_msg "Stopping $DESC" - + log_action_begin_msg "Stopping $DESC" if test -z "$2" ; then + PIDFILE= for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do NAME=`echo $PIDFILE | cut -c18-` NAME=${NAME%%.pid} + log_daemon_msg " Stopping VPN '$NAME'" stop_vpn - log_progress_msg "$NAME" done + if test -z "$PIDFILE" ; then + log_warning_msg " No VPN is running." + fi else while shift ; do [ -z "$1" ] && break if test -e /var/run/openvpn.$1.pid ; then + log_daemon_msg " Stopping VPN '$1'" PIDFILE=`ls /var/run/openvpn.$1.pid 2> /dev/null` NAME=`echo $PIDFILE | cut -c18-` NAME=${NAME%%.pid} stop_vpn - log_progress_msg "$NAME" else - log_failure_msg " (failure: No such VPN is running: $1)" + log_failure_msg " Stopping VPN '$1': No such VPN is running." fi done fi - log_end_msg 0 ;; # Only 'reload' running VPNs. New ones will only start with 'start' or 'restart'. reload|force-reload) - log_daemon_msg "Reloading $DESC" + log_action_begin_msg "Reloading $DESC" + PIDFILE= for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do NAME=`echo $PIDFILE | cut -c18-` NAME=${NAME%%.pid} # If openvpn if running under a different user than root we'll need to restart if egrep '^[[:blank:]]*user[[:blank:]]' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then + log_daemon_msg " Stopping VPN '$NAME'" stop_vpn sleep 1 + log_daemon_msg " Restarting VPN '$NAME'" start_vpn - log_progress_msg "(restarted)" else + log_daemon_msg " Restarting VPN '$NAME'" kill -HUP `cat $PIDFILE` || true - log_progress_msg "$NAME" + log_end_msg 0 fi done - log_end_msg 0 + if test -z "$PIDFILE" ; then + log_warning_msg " No VPN is running." + fi ;; - # Only 'soft-restart' running VPNs. New ones will only start with 'start' or 'restart'. soft-restart) - log_daemon_msg "$DESC sending SIGUSR1" + log_action_begin_msg "Soft-restarting $DESC" + PIDFILE= for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do NAME=`echo $PIDFILE | cut -c18-` NAME=${NAME%%.pid} + log_daemon_msg " Soft-restarting VPN '$NAME'" kill -USR1 `cat $PIDFILE` || true - log_progress_msg "$NAME" + log_end_msg 0 done - log_end_msg 0 - ;; - + if test -z "$PIDFILE" ; then + log_warning_msg " No VPN is running." + fi + ;; restart) shift $0 stop ${@} @@ -175,15 +194,20 @@ $0 start ${@} ;; cond-restart) - log_daemon_msg "Restarting $DESC." + log_action_begin_msg "Restarting $DESC" + PIDFILE= for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do NAME=`echo $PIDFILE | cut -c18-` NAME=${NAME%%.pid} + log_daemon_msg " Stopping VPN '$NAME'" stop_vpn sleep 1 + log_daemon_msg " Restarting VPN '$NAME'" start_vpn done - log_end_msg 0 + if test -z "$PIDFILE" ; then + log_warning_msg " No VPN is running." + fi ;; status) GLOBAL_STATUS=0 diff -u openvpn-2.1~rc19/debian/changelog openvpn-2.1~rc19/debian/changelog --- openvpn-2.1~rc19/debian/changelog +++ openvpn-2.1~rc19/debian/changelog @@ -1,3 +1,14 @@ +openvpn (2.1~rc19-1ubuntu1) karmic; urgency=low + + * Merge from debian unstable, remaining changes: LP: #404099 + - debian/openvpn.init.d: + - Do not use start-stop-daemon and use < /dev/null to avoid blocking boot + - show per-VPN result messages + - add "--script-security 2" by default for backwards compatibility + - Added lsb-base>=3.2-14 depend to allow status_of_proc() + + -- Bhavani Shankar Fri, 24 Jul 2009 19:22:13 +0530 + openvpn (2.1~rc19-1) unstable; urgency=low * New upstream version @@ -7,6 +18,17 @@ -- Alberto Gonzalez Iniesta Tue, 21 Jul 2009 17:00:56 +0200 +openvpn (2.1~rc15-1ubuntu1) karmic; urgency=low + + * Merge from debian unstable (LP: #372358), remaining changes: + - debian/openvpn.init.d: + - Do not use start-stop-daemon and use < /dev/null to avoid blocking boot + - show per-VPN result messages + - add "--script-security 2" by default for backwards compatibility + - Added lsb-base>=3.2-14 depend to allow status_of_proc() + + -- Andres Rodriguez Tue, 05 May 2009 14:25:37 -0500 + openvpn (2.1~rc15-1) unstable; urgency=low * New upstream version (Closes: #515575) @@ -26,6 +48,33 @@ -- Alberto Gonzalez Iniesta Thu, 30 Apr 2009 12:35:05 +0200 +openvpn (2.1~rc11-1ubuntu3) jaunty; urgency=low + + * debian/openvpn.init.d: + - Fix unexpected operator on startup (LP: #340120) + + -- Michael Jeanson Mon, 09 Mar 2009 16:02:50 -0400 + +openvpn (2.1~rc11-1ubuntu2) intrepid; urgency=low + + * debian/openvpn.init.d: + - Revert fix from #454371 that was merged at 2.1~rc7-4 to prevent + openvpn prompts from blocking the boot (LP: #280428) + - Fix VPNs always reported started [ OK ] + + -- Thierry Carrez Wed, 15 Oct 2008 17:12:54 +0200 + +openvpn (2.1~rc11-1ubuntu1) intrepid; urgency=low + + * Merge with Debian (LP: #279655), remaining diffs: + - debian/openvpn.init.d: Added 'status' action to init script, show + per-VPN result messages and add "--script-security 2" by default for + backwards compatibility + - debian/control: Added lsb-base>=3.2-14 depend to allow status_of_proc() + * Fixes regression when calling commands with arguments (LP: #277447) + + -- Thierry Carrez Tue, 07 Oct 2008 16:30:44 +0200 + openvpn (2.1~rc11-1) unstable; urgency=low * New upstream version @@ -46,6 +95,23 @@ -- Alberto Gonzalez Iniesta Thu, 11 Sep 2008 16:58:37 +0200 +openvpn (2.1~rc9-3ubuntu2) intrepid; urgency=low + + * debian/openvpn.init.d: + - Added 'status' action to init script (LP: #251641) + - Restored per-VPN result messages by using log_action_begin_msg and + one log_daemon_msg per VPN instead of log_progress_msg (LP: #264966) + * debian/control: Added lsb-base>=3.2-14 depend to allow status_of_proc() + + -- Thierry Carrez Tue, 09 Sep 2008 10:45:45 +0200 + +openvpn (2.1~rc9-3ubuntu1) intrepid; urgency=low + + * debian/openvpn.init.d: Add "--script-security 2" by default for backwards compatibility + (LP: #260291) + + -- Chuck Short Mon, 25 Aug 2008 10:20:31 -0400 + openvpn (2.1~rc9-3) unstable; urgency=low * debian/rules: run ./configure with path to 'route', for