From 66840d7ade58fc1864e46689b8057f0a8b202a42 Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos Date: Fri, 18 Nov 2011 14:11:50 +0200 Subject: [PATCH] Fix a bug in host's floppy exported variables The bug was triggered when a variable contained new lines --- snf-image-host/common.sh.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/snf-image-host/common.sh.in b/snf-image-host/common.sh.in index ae17b81..9d08816 100644 --- a/snf-image-host/common.sh.in +++ b/snf-image-host/common.sh.in @@ -189,10 +189,8 @@ create_floppy() { dd bs=512 count=2880 if=/dev/zero of="$img" mkfs.ext2 -F "$img" > /dev/null mount "$img" "$target" -o loop - set | egrep ^snf_export_\\w+=|sed -e 's/^snf_export_/SNF_IMAGE_/' | \ - while read line; do - echo "export $line" >> "$target/rules" - done + set | egrep ^snf_export_\\w+= | sed -e 's/^snf_export_/export SNF_IMAGE_/' \ + > "$target/rules" umount "$target" } -- 1.7.10.4