From 78c57f4e1f532ef7daf6c21ceec5f15d9b796c8a Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 12 Jan 2011 19:13:44 +0000 Subject: setup-disk: generate fstab early. support for verbose (-v) --- setup-disk.in | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'setup-disk.in') diff --git a/setup-disk.in b/setup-disk.in index a5c91a3..ee01101 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -168,6 +168,13 @@ install_mounted_root() { bootdisk="$bootdisk /dev/${i}" done fi + if [ -n "$VERBOSE" ]; then + echo "Root device: $rootdev" + echo "Root filesystem: $root_fs" + echo "Boot device: $bootdev" + echo "Boot filesystem: $boot_fs" + echo "Boot disk(s): $bootdisk" + fi if [ -z "$APKOVL" ]; then ovlfiles=/tmp/ovlfiles @@ -176,6 +183,18 @@ install_mounted_root() { echo "Restoring backup from $APKOVL to $rootdev..." unpack_apkovl "$APKOVL" "$mnt" || return 1 fi + + # generate the fstab + if [ -f "$mnt"/etc/fstab ]; then + mv "$mnt"/etc/fstab "$mnt"/etc/fstab.old + fi + enumerate_fstab "$mnt" >> "$mnt"/etc/fstab + cat >>"$mnt"/etc/fstab <> "$mnt"/etc/fstab - cat >>"$mnt"/etc/fstab <