diff options
Diffstat (limited to 'net-misc/openvpn/files/openvpn-2.1.init')
-rwxr-xr-x | net-misc/openvpn/files/openvpn-2.1.init | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net-misc/openvpn/files/openvpn-2.1.init b/net-misc/openvpn/files/openvpn-2.1.init index 1786f4d50235..d65e6f8bd7c4 100755 --- a/net-misc/openvpn/files/openvpn-2.1.init +++ b/net-misc/openvpn/files/openvpn-2.1.init @@ -69,7 +69,7 @@ start() { local args="" reenter=${RE_ENTER:-no} # If the config file does not specify the cd option, we do # But if we specify it, we override the config option which we do not want - if ! grep -q "^[ \t]*cd[ \t].*" "${VPNCONF}" ; then + if ! grep -q "^[ ]*cd[ ].*" "${VPNCONF}" ; then args="${args} --cd ${VPNDIR}" fi @@ -77,7 +77,7 @@ start() { # When we get an authenticated packet from the peer then we run our script # which configures our DNS if any and marks us as up. if [ "${DETECT_CLIENT:-yes}" = "yes" ] && \ - grep -q "^[ \t]*remote[ \t].*" "${VPNCONF}" ; then + grep -q "^[ ]*remote[ ].*" "${VPNCONF}" ; then reenter="yes" args="${args} --up-delay --up-restart" args="${args} --script-security 2" @@ -85,7 +85,7 @@ start() { args="${args} --down-pre --down /etc/openvpn/down.sh" # Warn about setting scripts as we override them - if grep -Eq "^[ \t]*(up|down)[ \t].*" "${VPNCONF}" ; then + if grep -Eq "^[ ]*(up|down)[ ].*" "${VPNCONF}" ; then ewarn "WARNING: You have defined your own up/down scripts" ewarn "As you're running as a client, we now force Gentoo specific" ewarn "scripts to be run for up and down events." @@ -95,15 +95,15 @@ start() { # Warn about the inability to change ip/route/dns information when # dropping privs - if grep -q "^[ \t]*user[ \t].*" "${VPNCONF}" ; then + if grep -q "^[ ]*user[ ].*" "${VPNCONF}" ; then ewarn "WARNING: You are dropping root privileges!" ewarn "As such openvpn may not be able to change ip, routing" ewarn "or DNS configuration." fi else # So we're a server. Run as openvpn unless otherwise specified - grep -q "^[ \t]*user[ \t].*" "${VPNCONF}" || args="${args} --user openvpn" - grep -q "^[ \t]*group[ \t].*" "${VPNCONF}" || args="${args} --group openvpn" + grep -q "^[ ]*user[ ].*" "${VPNCONF}" || args="${args} --user openvpn" + grep -q "^[ ]*group[ ].*" "${VPNCONF}" || args="${args} --group openvpn" fi # Ensure that our scripts get the PEER_DNS variable |