[SCM] Debian Live initramfs hook branch, master, updated. 1.157.1-1-1-g93d3744
Daniel Baumann
daniel at debian.org
Thu Mar 26 13:13:13 UTC 2009
The following commit has been merged in the master branch:
commit 93d37444704a224d656224e8aee5d944df86f4b8
Author: Daniel Baumann <daniel at debian.org>
Date: Thu Mar 26 14:06:37 2009 +0100
Correcting fstab handling to not always append entries forever when using persistency.
diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab
index f38eee7..1788f1f 100755
--- a/scripts/live-bottom/12fstab
+++ b/scripts/live-bottom/12fstab
@@ -32,17 +32,27 @@ log_begin_msg "Configuring fstab"
# live-initramfs script
-# Create a fake fstab only if it is not already there
+# Create a fake fstab only if it doesn't exist or if its the debootstrap template
if [ ! -f "${FSTAB}" ] || grep -qs 'UNCONFIGURED FSTAB FOR BASE SYSTEM' "${FSTAB}"
then
- cat >> ${FSTAB} << EOF
+
+cat >> ${FSTAB} << EOF
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
-${UNIONTYPE} / ${UNIONTYPE} rw 0 0
-tmpfs /tmp tmpfs nosuid,nodev 0 0
EOF
+
+fi
+
+if ! grep -qs "^${UNIONTYPE}" "${FSTAB}"
+then
+ echo "${UNIONTYPE} / ${UNIONTYPE} rw 0 0" >> "${FSTAB}"
+fi
+
+if ! grep -qs "^tmpfs /tmp" "${FSTAB}"
+then
+ echo "tmpfs /tmp tmpfs nosuid,nodev 0 0" >> "${FSTAB}"
fi
# disabled for now
--
Debian Live initramfs hook
More information about the debian-live-changes
mailing list