summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-07-24 16:56:35 +0200
committerDave Reisner <dreisner@archlinux.org>2012-07-24 17:15:35 +0200
commitb8459a2ac067b05925d660fdf2b62855eae544da (patch)
tree7832ffacf506b2e8fa006814f1e101c0fcf1bae0
parent7894028bae5ab8fb9422f5b2274cc9fd2b748e31 (diff)
downloadmkinitcpio-b8459a2ac067b05925d660fdf2b62855eae544da.tar.gz
mkinitcpio-b8459a2ac067b05925d660fdf2b62855eae544da.tar.xz
baseroot: add flagfile to indicate we're in an initramfs
This is used by udev to deal with firmware requests for firmware that is not available until the real root. It will also be used by systemd to detect what to do, if that is ever used. ref: http://www.spinics.net/lists/linux-wireless/msg94522.html Signed-off-by: Tom Gundersen <teg@jklm.no>
-rw-r--r--functions5
1 files changed, 4 insertions, 1 deletions
diff --git a/functions b/functions
index e17e46e..9c577f0 100644
--- a/functions
+++ b/functions
@@ -618,7 +618,7 @@ initialize_buildroot() {
fi
# base directory structure
- install -dm755 "$workdir/root"/{new_root,proc,sys,dev,run,tmp,usr/{local,lib,bin}}
+ install -dm755 "$workdir/root"/{new_root,proc,sys,dev,run,tmp,etc,usr/{local,lib,bin}}
ln -s "usr/lib" "$workdir/root/lib"
ln -s "../lib" "$workdir/root/usr/local/lib"
ln -s "bin" "$workdir/root/usr/sbin"
@@ -629,6 +629,9 @@ initialize_buildroot() {
# kernel module dir
install -dm755 "$workdir/root/usr/lib/modules/$kernver/kernel"
+ # indicate that this is an initramfs
+ >"$workdir/root/etc/initrd-release"
+
printf '%s' "$workdir"
}