summaryrefslogtreecommitdiffstats
path: root/lib/container/list
diff options
context:
space:
mode:
authorKatharina Drexel <katharina.drexel@bfh.ch>2020-10-08 15:12:27 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2020-10-30 04:04:17 +0000
commit795f0c9d4e0bd3f70730ad80a1c7fca94184c996 (patch)
tree47e29fc239c6b38b7a289b922ce72e6bb7b20923 /lib/container/list
parentAdding overlay options to debconf script. (diff)
downloadcompute-tools-795f0c9d4e0bd3f70730ad80a1c7fca94184c996.tar.xz
compute-tools-795f0c9d4e0bd3f70730ad80a1c7fca94184c996.zip
Adding awk optimizations in configuration file handling.
Signed-off-by: Katharina Drexel <katharina.drexel@bfh.ch>
Diffstat (limited to '')
-rwxr-xr-xlib/container/list6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/container/list b/lib/container/list
index 24457de..cf7b148 100755
--- a/lib/container/list
+++ b/lib/container/list
@@ -328,11 +328,11 @@ fi
for CONTAINER in ${CONTAINERS}
do
- STATE="$(machinectl show ${CONTAINER} 2>&1 | awk -F= '/^State=/ { print $2 }')"
+ STATE="$(machinectl show ${CONTAINER} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
if [ -e "${CONFIG}/${CONTAINER}.conf" ]
then
- CONTAINER_SERVER="$(awk -F= '/^cnt.container-server=/ { print $2 }' ${CONFIG}/${CONTAINER}.conf)"
+ CONTAINER_SERVER="$(awk -Fcnt.container-server= '/^cnt.container-server=/ { print $2 }' ${CONFIG}/${CONTAINER}.conf)"
CONTAINER_SERVER="${CONTAINER_SERVER:-false}"
case "${CONTAINER_SERVER}" in
@@ -367,7 +367,7 @@ do
if ls "${MACHINES}/${CONTAINER}/etc/systemd/network"/*.network > /dev/null 2>&1
then
- ADDRESS="$(awk -F= '/^Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network | head -n1)"
+ ADDRESS="$(awk -FAddress= '/^Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network | head -n1)"
elif [ -e "${MACHINES}/${CONTAINER}/etc/network/interfaces" ]
then
ADDRESS="$(awk '/address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/network/interfaces | head -n1)"