From a2eb0f23a9dd10dbbba9120d6efbf6d39e6003b2 Mon Sep 17 00:00:00 2001 From: Ronald van Zantvoort Date: Mon, 8 May 2017 14:08:29 +0200 Subject: [PATCH] vRouter: vr_cfg: style consistency fixes --- .../debian/config/opt/cloud/bin/vr_cfg.sh | 45 +++++++------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/vr_cfg.sh b/systemvm/patches/debian/config/opt/cloud/bin/vr_cfg.sh index e004127c2a0..ab16b40d6d3 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/vr_cfg.sh +++ b/systemvm/patches/debian/config/opt/cloud/bin/vr_cfg.sh @@ -27,39 +27,28 @@ log_it() { echo "$(date) : $*" >> $log } -while getopts 'c:' OPTION -do - case $OPTION in - c) cfg="$OPTARG" - ;; - esac -done +while getopts 'c:' OPTION; do + case $OPTION in + c) cfg="$OPTARG" ;; +esac; done -while read line -do +while read line; do #comment - if [[ $line == \#* ]] - then - continue - fi + if [[ $line == \#* ]]; then + continue - if [ "$line" == "" ] - then + elif [ "$line" == "" ]; then read line version=$line log_it "VR config: configuation format version $version" #skip read line - continue - fi - if [ "$line" == " read line log_it "VR config: execution success " - continue - fi - if [ "$line" == "" ] - then + elif [ "$line" == "" ]; then read line file=$line log_it "VR config: creating file: $file" rm -f $file - while read -r line - do - if [ "$line" == "" ] - then + while read -r line; do + if [ "$line" == "" ]; then break fi echo $line >> $file done log_it "VR config: create file success" - continue + fi + done < $cfg # archive the configuration file