From aab24476568da20ded1bf010189805c0d4e6b834 Mon Sep 17 00:00:00 2001 From: dahn Date: Thu, 18 Feb 2021 12:48:16 +0000 Subject: [PATCH] systemvm: loop optimisation in bash (#4451) Co-authored-by: Daan Hoogland --- systemvm/debian/opt/cloud/bin/vr_cfg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/vr_cfg.sh b/systemvm/debian/opt/cloud/bin/vr_cfg.sh index 619ec5c4483..8447947bd3b 100755 --- a/systemvm/debian/opt/cloud/bin/vr_cfg.sh +++ b/systemvm/debian/opt/cloud/bin/vr_cfg.sh @@ -33,7 +33,7 @@ while getopts 'c:' OPTION; do esac; done export DEFER_CONFIG=true -while read line; do +cat $cfg | while read line; do #comment if [[ $line == \#* ]]; then continue @@ -74,7 +74,7 @@ while read line; do fi -done < $cfg +done # archive the configuration file mv $cfg /var/cache/cloud/processed/