diff options
author | Guillaume Lambert <guillaume.lambert@orange.com> | 2021-03-08 21:38:31 +0100 |
---|---|---|
committer | Guillaume Lambert <guillaume.lambert@orange.com> | 2021-06-15 20:18:11 +0200 |
commit | 62178a49cc9e4088019d426636657d9f2980d242 (patch) | |
tree | adc2fb79281e74a6ac7a1b6ae53235792526a66d /docs | |
parent | 38634d6ef44d9d4954e553445451992e33c1f2f5 (diff) |
[COMMON] Fix a few bashisms
pointed out by checkbashisms:
- variable name HOSTNAME
- source instead of .
- variable increments
- sleep with suffix
And migrate a few shebangs to /bin/sh
Issue-ID: OOM-2643
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I82981bcff17e88cf824935b841ce37a585ddde00
Diffstat (limited to 'docs')
-rw-r--r-- | docs/master_nfs_node.sh | 4 | ||||
-rw-r--r-- | docs/openstack-k8s-controlnode.sh | 8 | ||||
-rw-r--r-- | docs/openstack-k8s-workernode.sh | 8 | ||||
-rw-r--r-- | docs/openstack-nfs-server.sh | 8 |
4 files changed, 14 insertions, 14 deletions
diff --git a/docs/master_nfs_node.sh b/docs/master_nfs_node.sh index 4a7a8dbc12..32574c9f29 100644 --- a/docs/master_nfs_node.sh +++ b/docs/master_nfs_node.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh usage () { echo "Usage:" @@ -23,7 +23,7 @@ sudo chown nobody:nogroup /dockerdata-nfs/ #Update the /etc/exports NFS_EXP="" for i in $@; do - NFS_EXP+="$i(rw,sync,no_root_squash,no_subtree_check) " + NFS_EXP="${NFS_EXP}$i(rw,sync,no_root_squash,no_subtree_check) " done echo "/dockerdata-nfs "$NFS_EXP | sudo tee -a /etc/exports diff --git a/docs/openstack-k8s-controlnode.sh b/docs/openstack-k8s-controlnode.sh index cd219aa56f..d1515a7e5f 100644 --- a/docs/openstack-k8s-controlnode.sh +++ b/docs/openstack-k8s-controlnode.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh DOCKER_VERSION=18.09.5 @@ -18,10 +18,10 @@ systemctl daemon-reload systemctl restart docker apt-mark hold docker-ce -IP_ADDR=`ip address |grep ens|grep inet|awk '{print $2}'| awk -F / '{print $1}'` -HOSTNAME=`hostname` +IP_ADDR=$(ip address |grep ens|grep inet|awk '{print $2}'| awk -F / '{print $1}') +HOST_NAME=$(hostname) -echo "$IP_ADDR $HOSTNAME" >> /etc/hosts +echo "$IP_ADDR $HOST_NAME" >> /etc/hosts docker login -u docker -p docker nexus3.onap.org:10001 diff --git a/docs/openstack-k8s-workernode.sh b/docs/openstack-k8s-workernode.sh index 3f32d050a9..8b1b9e41ee 100644 --- a/docs/openstack-k8s-workernode.sh +++ b/docs/openstack-k8s-workernode.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh DOCKER_VERSION=18.09.5 @@ -18,10 +18,10 @@ systemctl daemon-reload systemctl restart docker apt-mark hold docker-ce -IP_ADDR=`ip address |grep ens|grep inet|awk '{print $2}'| awk -F / '{print $1}'` -HOSTNAME=`hostname` +IP_ADDR=$(ip address |grep ens|grep inet|awk '{print $2}'| awk -F / '{print $1}') +HOST_NAME=$(hostname) -echo "$IP_ADDR $HOSTNAME" >> /etc/hosts +echo "$IP_ADDR $HOST_NAME" >> /etc/hosts docker login -u docker -p docker nexus3.onap.org:10001 diff --git a/docs/openstack-nfs-server.sh b/docs/openstack-nfs-server.sh index 1db04eaff6..395d04f27c 100644 --- a/docs/openstack-nfs-server.sh +++ b/docs/openstack-nfs-server.sh @@ -1,11 +1,11 @@ -#!/bin/bash +#!/bin/sh apt-get update -IP_ADDR=`ip address |grep ens|grep inet|awk '{print $2}'| awk -F / '{print $1}'` -HOSTNAME=`hostname` +IP_ADDR=$(ip address |grep ens|grep inet|awk '{print $2}'| awk -F / '{print $1}') +HOST_NAME=$(hostname) -echo "$IP_ADDR $HOSTNAME" >> /etc/hosts +echo "$IP_ADDR $HOST_NAME" >> /etc/hosts sudo apt-get install make -y |