[arch-projects] [PATCH][initscripts] baseroot: add a flagfile to tell userspace that it is in an initramfs
Tom Gundersen
teg at jklm.no
Tue Jul 24 10:56:35 EDT 2012
This is used by udev to deal with firmware recquests 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.
Signed-off-by: Tom Gundersen <teg at jklm.no>
---
functions | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/functions b/functions
index e17e46e..478feb0 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,usr/{local,lib,bin},etc}
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"
}
--
1.7.11.3
More information about the arch-projects
mailing list