summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-02-23 11:44:20 +0000
committerRoy Marples <uberlord@gentoo.org>2007-02-23 11:44:20 +0000
commit63b8f46c84c689ceecf6e4d60f0439315723a2a6 (patch)
tree881b2d54edeb1bf8b80850fb56c5201f50a040cb /net-misc/openvpn/files
parentstable x86; bug 168106 (diff)
downloadhistorical-63b8f46c84c689ceecf6e4d60f0439315723a2a6.tar.gz
historical-63b8f46c84c689ceecf6e4d60f0439315723a2a6.tar.bz2
historical-63b8f46c84c689ceecf6e4d60f0439315723a2a6.zip
Init scripts no longer require bash.
Package-Manager: portage-2.1.2-r10
Diffstat (limited to 'net-misc/openvpn/files')
-rw-r--r--net-misc/openvpn/files/digest-openvpn-2.0.7-r23
-rw-r--r--net-misc/openvpn/files/digest-openvpn-2.1_rc1-r23
-rwxr-xr-xnet-misc/openvpn/files/down.sh2
-rwxr-xr-xnet-misc/openvpn/files/openvpn-2.1.init33
-rw-r--r--net-misc/openvpn/files/openvpn.init10
-rwxr-xr-xnet-misc/openvpn/files/up.sh4
6 files changed, 29 insertions, 26 deletions
diff --git a/net-misc/openvpn/files/digest-openvpn-2.0.7-r2 b/net-misc/openvpn/files/digest-openvpn-2.0.7-r2
new file mode 100644
index 000000000000..c534cdba1b47
--- /dev/null
+++ b/net-misc/openvpn/files/digest-openvpn-2.0.7-r2
@@ -0,0 +1,3 @@
+MD5 93528233f1f6d02fc18e2c00f82e0aca openvpn-2.0.7.tar.gz 665129
+RMD160 b89f6df5ff08326f4e07e6cd4abda633627ef9e4 openvpn-2.0.7.tar.gz 665129
+SHA256 9e29ebfb76375379b4ca12c2270dff3b4b1636eb643747c69249ae206833052e openvpn-2.0.7.tar.gz 665129
diff --git a/net-misc/openvpn/files/digest-openvpn-2.1_rc1-r2 b/net-misc/openvpn/files/digest-openvpn-2.1_rc1-r2
new file mode 100644
index 000000000000..03a90a8e78bc
--- /dev/null
+++ b/net-misc/openvpn/files/digest-openvpn-2.1_rc1-r2
@@ -0,0 +1,3 @@
+MD5 b0773149ef9d93a0075dfa42b87042a0 openvpn-2.1_rc1.tar.gz 796620
+RMD160 751d07c3b9b40cc3c9a1649ad8b10b9d889a5690 openvpn-2.1_rc1.tar.gz 796620
+SHA256 b5eb4f0d4eda58aaa8b60eb1b2f1d1a0d55ca22e9b098a2f65b6f44abc1c9e11 openvpn-2.1_rc1.tar.gz 796620
diff --git a/net-misc/openvpn/files/down.sh b/net-misc/openvpn/files/down.sh
index 85f565b0ea45..23d9c264b9fb 100755
--- a/net-misc/openvpn/files/down.sh
+++ b/net-misc/openvpn/files/down.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2006 Gentoo Foundation
+# Copyright (c) 2006-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Contributed by Roy Marples (uberlord@gentoo.org)
diff --git a/net-misc/openvpn/files/openvpn-2.1.init b/net-misc/openvpn/files/openvpn-2.1.init
index 060bc4d4a12b..972e80fdd82e 100755
--- a/net-misc/openvpn/files/openvpn-2.1.init
+++ b/net-misc/openvpn/files/openvpn-2.1.init
@@ -1,10 +1,10 @@
#!/sbin/runscript
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-VPNDIR="${VPNDIR:-/etc/openvpn}"
-VPN="${SVCNAME#*.}"
-if [[ -n ${VPN} && ${SVCNAME} != "openvpn" ]]; then
+VPNDIR=${VPNDIR:-/etc/openvpn}
+VPN=${SVCNAME#*.}
+if [ -n "${VPN}" ] && [ ${SVCNAME} != "openvpn" ]; then
VPNPID="/var/run/openvpn.${VPN}.pid"
else
VPNPID="/var/run/openvpn.pid"
@@ -18,15 +18,15 @@ depend() {
checkconfig() {
# Linux has good dynamic tun/tap creation
- if [[ $(uname) == "Linux" ]] ; then
- if [[ ! -e /dev/net/tun ]]; then
+ if [ $(uname -s) = "Linux" ] ; then
+ if [ ! -e /dev/net/tun ]; then
if ! modprobe tun ; then
eerror "TUN/TAP support is not available" \
"in this kernel"
return 1
fi
fi
- if [[ -h /dev/net/tun && -c /dev/misc/net/tun ]]; then
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
ebegin "Detected broken /dev/net/tun symlink, fixing..."
rm -f /dev/net/tun
ln -s /dev/misc/net/tun /dev/net/tun
@@ -38,18 +38,18 @@ checkconfig() {
# Other OS's don't, so we rely on a pre-configured interface
# per vpn instance
local ifname=$(sed -n -e 's/[[:space:]]*dev[[:space:]][[:space:]]*\([^[:space:]]*\).*/\1/p' "${VPNCONF}")
- if [[ -z ${ifname} ]] ; then
+ if [ -z ${ifname} ] ; then
eerror "You need to specify the interface that this openvpn" \
"instance should use" \
"by using the dev option in ${VPNCONF}"
return 1
fi
- if ! ifconfig "${ifname}" &>/dev/null ; then
+ if ! ifconfig "${ifname}" >/dev/null ; then
# Try and create it
- echo > /dev/"${ifname}" &>/dev/null
+ echo > /dev/"${ifname}" >/dev/null
fi
- if ! ifconfig "${ifname}" &>/dev/null ; then
+ if ! ifconfig "${ifname}" >/dev/null ; then
eerror "${VPNCONF} requires interface ${ifname}" \
"but that does not exist"
return 1
@@ -59,7 +59,7 @@ checkconfig() {
start() {
# If we are re-called by the openvpn gentoo-up.sh script
# then we don't actually want to start openvpn
- [[ ${IN_BACKGROUND} == "true" ]] && return 0
+ [ "${IN_BACKGROUND}" = "true" ] && return 0
ebegin "Starting ${SVCNAME}"
@@ -103,9 +103,7 @@ start() {
grep -q "^[ \t]*group[ \t].*" "${VPNCONF}" || args="${args} --group openvpn"
fi
- if ${client} && [[ $(type -t mark_service_inactive) == "function" ]] ; then
- mark_service_inactive "${SVCNAME}"
- fi
+ ${client} && mark_service_inactive "${SVCNAME}"
start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \
-- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon ${args}
eend $? "Check your logs to see why startup failed"
@@ -114,9 +112,8 @@ start() {
stop() {
# If we are re-called by the openvpn gentoo-down.sh script
# then we don't actually want to stop openvpn
- if [[ ${IN_BACKGROUND} == "true" ]] ; then
- [[ $(type -t mark_service_inactive) == "function" ]] \
- && mark_service_inactive "${SVCNAME}"
+ if [ "${IN_BACKGROUND}" = "true" ] ; then
+ mark_service_inactive "${SVCNAME}"
return 0
fi
diff --git a/net-misc/openvpn/files/openvpn.init b/net-misc/openvpn/files/openvpn.init
index 809df9bec2df..64c1bdd1bfae 100644
--- a/net-misc/openvpn/files/openvpn.init
+++ b/net-misc/openvpn/files/openvpn.init
@@ -1,10 +1,10 @@
#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
VPNDIR="/etc/openvpn"
VPN="${SVCNAME#*.}"
-if [[ -n ${VPN} && ${SVCNAME} != "openvpn" ]]; then
+if [ -n "${VPN}" ] && [ "${SVCNAME}" != "openvpn" ]; then
VPNPID="/var/run/openvpn.${VPN}.pid"
else
VPNPID="/var/run/openvpn.pid"
@@ -17,13 +17,13 @@ depend() {
}
checktundevice() {
- if [[ ! -e /dev/net/tun ]]; then
+ if [ ! -e /dev/net/tun ]; then
if ! modprobe tun ; then
eerror "TUN/TAP support is not available in this kernel"
return 1
fi
fi
- if [[ -h /dev/net/tun && -c /dev/misc/net/tun ]]; then
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
ebegin "Detected broken /dev/net/tun symlink, fixing..."
rm -f /dev/net/tun
ln -s /dev/misc/net/tun /dev/net/tun
@@ -36,7 +36,7 @@ start() {
checktundevice || return 1
- if [[ ! -e "${VPNCONF}" ]]; then
+ if [ ! -e "${VPNCONF}" ]; then
eend 1 "${VPNCONF} does not exist"
return 1
fi
diff --git a/net-misc/openvpn/files/up.sh b/net-misc/openvpn/files/up.sh
index 7ec451796184..879c1c7b1514 100755
--- a/net-misc/openvpn/files/up.sh
+++ b/net-misc/openvpn/files/up.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2006 Gentoo Foundation
+# Copyright (c) 2006-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Contributed by Roy Marples (uberlord@gentoo.org)
@@ -22,7 +22,7 @@ while true ; do
elif [ "${opt}" != "${opt#dhcp-option DNS *}" ] ; then
NS="${DNS}nameserver ${opt#dhcp-option DNS *}\n"
fi
- i=$((i + 1))
+ i=$((${i} + 1))
done
if [ -n "${NS}" ] ; then