[COMMON] Get rid of a few bashisms 30/118730/3
authorGuillaume Lambert <guillaume.lambert@orange.com>
Tue, 2 Mar 2021 20:45:00 +0000 (21:45 +0100)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 3 Mar 2021 06:58:00 +0000 (06:58 +0000)
The built-in command source is a bashism.
Profiles script must be dotted and not sourced when possible.

Issue-ID: OOM-2688 OOM-2158
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: Id7cad0d499129fa3b7ea020e906748243b1b3ace

kubernetes/common/certInitializer/templates/_certInitializer.yaml
kubernetes/common/etcd/templates/statefulset.yaml
kubernetes/policy/components/policy-apex-pdp/templates/statefulset.yaml

index a46400b..414192e 100644 (file)
@@ -67,9 +67,8 @@
     - sh
     - -c
     - |
-      #!/usr/bin/env bash
       /opt/app/aaf_config/bin/agent.sh
-      source /opt/app/aaf_config/bin/retrieval_check.sh
+      . /opt/app/aaf_config/bin/retrieval_check.sh
 {{-     if $initRoot.aaf_add_config }}
       /opt/app/aaf_config/bin/aaf-add-config.sh
 {{-     end }}
index e39b8c4..a343d4f 100644 (file)
@@ -184,7 +184,7 @@ spec:
                 fi
 
                 cat /var/run/etcd/new_member_envs
-                source /var/run/etcd/new_member_envs
+                . /var/run/etcd/new_member_envs
 
                 collect_member &
 
index 10c2a05..586f468 100755 (executable)
@@ -71,7 +71,7 @@ spec:
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command: ["sh","-c"]
           args: ["if [ -f {{ .Values.certInitializer.credsPath }}/.ci ]; then \
-                  source {{ .Values.certInitializer.credsPath }}/.ci; fi;\
+                  . {{ .Values.certInitializer.credsPath }}/.ci; fi;\
                   /opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /home/apexuser/config/OnapPfConfig.json"]
           ports:
           - containerPort: {{ .Values.service.externalPort }}