rootfs-block/mount-root.sh: correctly printf to fstab
authorHarald Hoyer <harald@redhat.com>
Wed, 10 Nov 2010 19:11:31 +0000 (20:11 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 10 Nov 2010 19:11:31 +0000 (20:11 +0100)
modules.d/95rootfs-block/mount-root.sh

index 00cf475..bc17848 100755 (executable)
@@ -109,7 +109,7 @@ if [ -n "$root" -a -z "${root%%block:*}" ]; then
 
     # backslashes are treated as escape character in fstab
     esc_root=$(echo ${root#block:} | sed 's,\\,\\\\,g')
-    printf "%s $NEWROOT $rootfs ${rflags},${rootopts} 1 1\n" "$esc_root" > /etc/fstab
+    printf '%s %s %s %s,%s 1 1 \n' "$esc_root" "$NEWROOT" "$rootfs" "$rflags" "$rootopts"  > /etc/fstab
 
     if [ -z "$fastboot" -a "$READONLY" != "yes" ]; then
         info "Checking filesystems"