Fix bashisms
There's 3 scripts which include bashisms, which would fail in Debian, where the default shell interpreter for sh is dash, and not bash. This patch fixes these bashisms. It also fixes the wrong interpreter path in iser_rename.erb. Change-Id: Ic3415e3d07bc9dce1af2fbdf7fdbfead5264d788 Closes-Bug: #1542971
This commit is contained in:
parent
eb1d978ec3
commit
5d869c381a
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# Constants
|
||||
readonly SCOPE=`basename $0`
|
||||
@ -12,7 +12,7 @@ ISER_NAME='<%=@iser_interface_name%>'
|
||||
FATHER_FIRST_VF="/sys/class/net/$STORAGE_PORT/device/virtfn0"
|
||||
|
||||
# This functions print logs to /var/log/messages
|
||||
function logger_print () {
|
||||
logger_print () {
|
||||
priority=$1
|
||||
msg=$2
|
||||
logger -t $SCOPE "$priority: $msg"
|
||||
|
@ -15,7 +15,7 @@ done
|
||||
BASE_PATH="$keys_path/$cluster_id"
|
||||
CONF_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
function generate_open_ssl_keys {
|
||||
generate_open_ssl_keys () {
|
||||
for i in $open_ssl_keys
|
||||
do
|
||||
local dir_path="$BASE_PATH/$i"
|
||||
|
@ -20,7 +20,7 @@ declare -x RANDFILE=/root/.rnd
|
||||
|
||||
BASE_PATH=$keys_path/$cluster_id/
|
||||
|
||||
function generate_open_ssl_keys {
|
||||
generate_open_ssl_keys () {
|
||||
for i in $open_ssl_keys
|
||||
do
|
||||
local dir_path=$BASE_PATH$i/
|
||||
@ -34,7 +34,7 @@ function generate_open_ssl_keys {
|
||||
done
|
||||
}
|
||||
|
||||
function generate_ssh_keys {
|
||||
generate_ssh_keys () {
|
||||
for i in $ssh_keys
|
||||
do
|
||||
local dir_path=$BASE_PATH$i/
|
||||
@ -48,7 +48,7 @@ function generate_ssh_keys {
|
||||
done
|
||||
}
|
||||
|
||||
function generate_fernet_keys {
|
||||
generate_fernet_keys () {
|
||||
for i in $fernet_keys
|
||||
do
|
||||
local dir_path=${BASE_PATH}fernet-keys/
|
||||
|
Loading…
Reference in New Issue
Block a user