From: Dan Nelson Date: Sun, 28 Feb 2010 21:09:18 +0000 (+0100) Subject: bash->bourne script cleanup X-Git-Tag: v2.2-beta4~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d4e7685cd1a6d8e1eb1befa241b7595809d3b45;p=thirdparty%2Fopenvpn.git bash->bourne script cleanup Many of the scripts in the openvpn source have their shell set to /bin/bash, but only two use bash features. The attached patch (against openvpn-2.1_rc9) sets the shell on the rest of the scripts to /bin/sh for better portability. The only scripts that actually require bash are contrib/pull-resolv-conf/client.{up,down} ; they use the ${!var} variable indirection feature. sf.net tracker: Discussed on the IRC meeting March 4, 2010 in #openvpn-discussions. Signed-off-by: David Sommerseth Acked-by: James Yonan --- diff --git a/easy-rsa/2.0/build-ca b/easy-rsa/2.0/build-ca index fb1e2ca79..bce29a6a3 100755 --- a/easy-rsa/2.0/build-ca +++ b/easy-rsa/2.0/build-ca @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Build a root certificate diff --git a/easy-rsa/2.0/build-dh b/easy-rsa/2.0/build-dh index f019222e1..4beb127fd 100755 --- a/easy-rsa/2.0/build-dh +++ b/easy-rsa/2.0/build-dh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Build Diffie-Hellman parameters for the server side # of an SSL/TLS connection. diff --git a/easy-rsa/2.0/build-inter b/easy-rsa/2.0/build-inter index f831d6f7b..87bf98d4d 100755 --- a/easy-rsa/2.0/build-inter +++ b/easy-rsa/2.0/build-inter @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Make an intermediate CA certificate/private key pair using a locally generated # root certificate. diff --git a/easy-rsa/2.0/build-key b/easy-rsa/2.0/build-key index 619630833..6c0fed82a 100755 --- a/easy-rsa/2.0/build-key +++ b/easy-rsa/2.0/build-key @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Make a certificate/private key pair using a locally generated # root certificate. diff --git a/easy-rsa/2.0/build-key-pass b/easy-rsa/2.0/build-key-pass index 35543e0b9..8ef830774 100755 --- a/easy-rsa/2.0/build-key-pass +++ b/easy-rsa/2.0/build-key-pass @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Similar to build-key, but protect the private key # with a password. diff --git a/easy-rsa/2.0/build-key-pkcs12 b/easy-rsa/2.0/build-key-pkcs12 index 5ef064ff4..ba90e6adf 100755 --- a/easy-rsa/2.0/build-key-pkcs12 +++ b/easy-rsa/2.0/build-key-pkcs12 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Make a certificate/private key pair using a locally generated # root certificate and convert it to a PKCS #12 file including the diff --git a/easy-rsa/2.0/build-key-server b/easy-rsa/2.0/build-key-server index 550267554..fee019488 100755 --- a/easy-rsa/2.0/build-key-server +++ b/easy-rsa/2.0/build-key-server @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Make a certificate/private key pair using a locally generated # root certificate. diff --git a/easy-rsa/2.0/build-req b/easy-rsa/2.0/build-req index 26587d168..559d512e8 100755 --- a/easy-rsa/2.0/build-req +++ b/easy-rsa/2.0/build-req @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Build a certificate signing request and private key. Use this # when your root certificate and key is not available locally. diff --git a/easy-rsa/2.0/build-req-pass b/easy-rsa/2.0/build-req-pass index 6e6c8637b..b73ee1b5e 100755 --- a/easy-rsa/2.0/build-req-pass +++ b/easy-rsa/2.0/build-req-pass @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Like build-req, but protect your private key # with a password. diff --git a/easy-rsa/2.0/clean-all b/easy-rsa/2.0/clean-all index 0576db5fa..cc6e3b2f5 100755 --- a/easy-rsa/2.0/clean-all +++ b/easy-rsa/2.0/clean-all @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Initialize the $KEY_DIR directory. # Note that this script does a diff --git a/easy-rsa/2.0/inherit-inter b/easy-rsa/2.0/inherit-inter index 210195163..aaa51688c 100755 --- a/easy-rsa/2.0/inherit-inter +++ b/easy-rsa/2.0/inherit-inter @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Build a new PKI which is rooted on an intermediate certificate generated # by ./build-inter or ./pkitool --inter from a parent PKI. The new PKI should diff --git a/easy-rsa/2.0/list-crl b/easy-rsa/2.0/list-crl index afc0cd616..d1d8a69ce 100755 --- a/easy-rsa/2.0/list-crl +++ b/easy-rsa/2.0/list-crl @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # list revoked certificates diff --git a/easy-rsa/2.0/revoke-full b/easy-rsa/2.0/revoke-full index efc94e869..4169c4ca5 100755 --- a/easy-rsa/2.0/revoke-full +++ b/easy-rsa/2.0/revoke-full @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # revoke a certificate, regenerate CRL, # and verify revocation diff --git a/easy-rsa/2.0/sign-req b/easy-rsa/2.0/sign-req index 38655d359..6cae7b4e6 100755 --- a/easy-rsa/2.0/sign-req +++ b/easy-rsa/2.0/sign-req @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Sign a certificate signing request (a .csr file) # with a local root certificate and key. diff --git a/sample-config-files/firewall.sh b/sample-config-files/firewall.sh index f0db8063c..19d75ee92 100755 --- a/sample-config-files/firewall.sh +++ b/sample-config-files/firewall.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # A Sample OpenVPN-aware firewall. diff --git a/sample-scripts/bridge-start b/sample-scripts/bridge-start index bfbbdc584..d20a26032 100755 --- a/sample-scripts/bridge-start +++ b/sample-scripts/bridge-start @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ################################# # Set up Ethernet bridge on Linux diff --git a/sample-scripts/bridge-stop b/sample-scripts/bridge-stop index d45289372..81927794c 100755 --- a/sample-scripts/bridge-stop +++ b/sample-scripts/bridge-stop @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh #################################### # Tear Down Ethernet bridge on Linux