diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/rc.d/init.d/openvpn-bridge mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/rc.d/init.d/openvpn-bridge --- smeserver-openvpn-bridge-2.0/root/etc/rc.d/init.d/openvpn-bridge 2008-09-02 23:13:34.000000000 +0200 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/rc.d/init.d/openvpn-bridge 1970-01-01 01:00:00.000000000 +0100 @@ -1,239 +0,0 @@ -#!/bin/sh -# -# openvpn This shell script takes care of starting and stopping -# openvpn on RedHat or other chkconfig-based system. -# -# chkconfig: 345 24 76 -# -# description: OpenVPN is a robust and highly flexible tunneling application that -# uses all of the encryption, authentication, and certification features -# of the OpenSSL library to securely tunnel IP networks over a single -# UDP port. -# - -# Contributed to the OpenVPN project by -# Douglas Keller -# 2002.05.15 - -# To install: -# copy this file to /etc/rc.d/init.d/openvpn -# shell> chkconfig --add openvpn -# shell> mkdir /etc/openvpn -# make .conf or .sh files in /etc/openvpn (see below) - -# To uninstall: -# run: chkconfig --del openvpn - -# Author's Notes: -# -# I have created an /etc/init.d init script and enhanced openvpn.spec to -# automatically register the init script. Once the RPM is installed you -# can start and stop OpenVPN with "service openvpn start" and "service -# openvpn stop". -# -# The init script does the following: -# -# - Starts an openvpn process for each .conf file it finds in -# /etc/openvpn. -# -# - If /etc/openvpn/xxx.sh exists for a xxx.conf file then it executes -# it before starting openvpn (useful for doing openvpn --mktun...). -# -# - In addition to start/stop you can do: -# -# service openvpn reload - SIGHUP -# service openvpn reopen - SIGUSR1 -# service openvpn status - SIGUSR2 -# -# Modifications: -# -# 2003.05.02 -# * Changed == to = for sh compliance (Bishop Clark). -# * If condrestart|reload|reopen|status, check that we were -# actually started (James Yonan). -# * Added lock, piddir, and work variables (James Yonan). -# * If start is attempted twice, without an intervening stop, or -# if start is attempted when previous start was not properly -# shut down, then kill any previously started processes, before -# commencing new start operation (James Yonan). -# * Do a better job of flagging errors on start, and properly -# returning success or failure status to caller (James Yonan). -# -# 2005.04.04 -# * Added openvpn-startup and openvpn-shutdown script calls -# (James Yonan). -# - -# Location of openvpn binary -openvpn="" -openvpn_locations="/usr/sbin/openvpn /usr/local/sbin/openvpn" -for location in $openvpn_locations -do - if [ -f "$location" ] - then - openvpn=$location - fi -done - -# configuration file -conf=server-bridge - -# Lockfile -lock="/var/lock/subsys/openvpn-bridge" - -# PID directory -piddir="/var/run/openvpn" - -# Our working directory -work=/etc/openvpn - -# Source function library. -. /etc/rc.d/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - -# Check that networking is up. -if [ ${NETWORKING} = "no" ] -then - echo "Networking is down" - exit 0 -fi - -# Check that binary exists -if ! [ -f $openvpn ] -then - echo "openvpn binary not found" - exit 0 -fi - -# See how we were called. -case "$1" in - start) - echo -n $"Starting openvpn: " - - /sbin/modprobe tun >/dev/null 2>&1 - - # From a security perspective, I think it makes - # sense to remove this, and have users who need - # it explictly enable in their --up scripts or - # firewall setups. - - #echo 1 > /proc/sys/net/ipv4/ip_forward - - if [ ! -d $piddir ]; then - mkdir $piddir - fi - - if [ -f $lock ]; then - # we were not shut down correctly - if [ -s $piddir/$conf.pid ]; then - kill `cat $piddir/$conf.pid` >/dev/null 2>&1 - fi - rm -f $piddir/$conf.pid - rm -f $lock - sleep 2 - fi - - rm -f $piddir/$conf.pid - cd $work - - errors=0 - successes=0 - - # Run startup script, if defined - if [ -f $work/$conf.up ]; then - $work/$conf.up - fi - - rm -f $piddir/$conf.pid - $openvpn --daemon --writepid $piddir/$conf.pid --config $work/$conf.ovpn --cd $work - if [ $? = 0 ]; then - successes=1 - else - errors=1 - fi - - if [ $errors = 1 ]; then - failure; echo - else - success; echo - fi - - if [ $successes = 1 ]; then - touch $lock - fi - ;; - stop) - echo -n $"Shutting down openvpn: " - cd $work - # Run shutdown script, if defined - if [ -s $piddir/$conf.pid ]; then - kill `cat $piddir/$conf.pid` >/dev/null 2>&1 - fi - if [ -f $work/$conf.down ]; then - $work/$conf.down - fi - rm -f $piddir/$conf.pid - - success; echo - rm -f $lock - ;; - restart) - $0 stop - sleep 2 - $0 start - ;; - reload) - if [ -f $lock ]; then - if [ -s $piddir/$conf.pid ]; then - kill -HUP `cat $piddir/$conf.pid` >/dev/null 2>&1 - fi - else - echo "openvpn: service not started" - exit 1 - fi - ;; - reopen) - if [ -f $lock ]; then - if [ -s $piddir/$conf.pid ]; then - kill -USR1 `cat $piddir/$conf.pid` >/dev/null 2>&1 - fi - else - echo "openvpn: service not started" - exit 1 - fi - ;; - condrestart) - if [ -f $lock ]; then - $0 stop - # avoid race - sleep 2 - $0 start - fi - ;; - status) - if [ -f $lock ]; then - if [ -s $piddir/$conf.pid ]; then - kill -USR2 `cat $piddir/$conf.pid` >/dev/null 2>&1 - fi - echo "Status written to /var/log/messages" - else - echo "openvpn: service not started" - exit 1 - fi - ;; - adjust) - CONF_STATUS=$(/sbin/e-smith/db configuration getprop openvpn-bridge status) - $0 stop - sleep 2 - if [ $CONF_STATUS == 'enabled' ]; then - $0 start - fi - ;; - *) - echo "Usage: openvpn {start|stop|restart|condrestart|reload|reopen|status|adjust}" - exit 1 - ;; -esac -exit 0 diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/rc.d/init.d/reset-openvpn mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/rc.d/init.d/reset-openvpn --- smeserver-openvpn-bridge-2.0/root/etc/rc.d/init.d/reset-openvpn 2008-12-02 14:23:04.000000000 +0100 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/rc.d/init.d/reset-openvpn 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -#!/bin/bash -#################################### -# Reset SME openvpn configuration after unclean shutdown -#################################### -eth=$(/sbin/e-smith/db configuration getprop bridge ethernetInterface) -/sbin/e-smith/db configuration setprop InternalInterface Name $eth -