summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-09-03 16:59:23 +0200
committerDave Reisner <dreisner@archlinux.org>2012-09-17 16:30:59 +0200
commit2b5877dbfb24dedb23cd23ea8dbec1b1a98ad589 (patch)
tree8854191a632b98cbdae717729b81c4664b37b0e6
parentc0b975a8e3efacd965ec5166af4d572253f51143 (diff)
downloadmkinitcpio-2b5877dbfb24dedb23cd23ea8dbec1b1a98ad589.tar.gz
mkinitcpio-2b5877dbfb24dedb23cd23ea8dbec1b1a98ad589.tar.xz
install fstab/mtab as part of base layout
These are low level enough that they should be part of the base layout, similar to the filesystem package in userspace. Later hooks can easily override these, if they really want to. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--functions4
-rw-r--r--install/base5
2 files changed, 4 insertions, 5 deletions
diff --git a/functions b/functions
index eee09ec..4f25a86 100644
--- a/functions
+++ b/functions
@@ -630,6 +630,10 @@ initialize_buildroot() {
# kernel module dir
install -dm755 "$workdir/root/usr/lib/modules/$kernver/kernel"
+ # mount tables
+ ln -s /proc/self/mounts "$workdir/root/etc/mtab"
+ >"$workdir/root/etc/fstab"
+
# indicate that this is an initramfs
>"$workdir/root/etc/initrd-release"
diff --git a/install/base b/install/base
index 7bb23a8..02678e9 100644
--- a/install/base
+++ b/install/base
@@ -19,11 +19,6 @@ build() {
add_binary mount
add_binary switch_root
- add_symlink "/etc/mtab" "/proc/self/mounts"
-
- # Add an empty fstab for mount and fsck
- >"$BUILDROOT/etc/fstab"
-
add_file "/usr/lib/initcpio/init_functions" "/init_functions"
add_file "/usr/lib/initcpio/init" "/init"
add_file "/usr/lib/modprobe.d/usb-load-ehci-first.conf"