diff options
author | Katharina Drexel <katharina.drexel@bfh.ch> | 2020-10-08 15:12:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2020-10-30 04:04:17 +0000 |
commit | 795f0c9d4e0bd3f70730ad80a1c7fca94184c996 (patch) | |
tree | 47e29fc239c6b38b7a289b922ce72e6bb7b20923 /lib/container/list | |
parent | Adding overlay options to debconf script. (diff) | |
download | compute-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 'lib/container/list')
-rwxr-xr-x | lib/container/list | 6 |
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)" |