home: hub: mkinitfs

Download patch

ref: 3b4cece145993890ba8499f2af18f77c7ddea0e9
parent: eb96e64b989ae7cf39cd0cdf849104ac1d5ee655
author: Natanael Copa <ncopa@alpinelinux.org>
date: Wed Mar 7 02:26:51 CST 2012

init: avoid error message if /etc/fstab is missing in sysroot

--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -572,11 +572,12 @@
 fi
 
 # respect mount options in fstab for ALPINE_MNT (e.g if user wants rw)
-opts=$(awk "\$2 == \"$ALPINE_MNT\" {print \$4}" $sysroot/etc/fstab)
-if [ -n "$opts" ]; then
-	mount -o remount,$opts "$ALPINE_MNT"
+if [ -f "$sysroot"/etc/fstab ]; then
+	opts=$(awk "\$2 == \"$ALPINE_MNT\" {print \$4}" $sysroot/etc/fstab)
+	if [ -n "$opts" ]; then
+		mount -o remount,$opts "$ALPINE_MNT"
+	fi
 fi
-
 
 # fix inittab if alternative console
 setup_inittab_console $CONSOLE