From a9dadcf142d95af8bd53ba814f47f783a80e19e3 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Fri, 3 Mar 2017 21:13:38 +0000 Subject: [PATCH] Output /etc/os-release when the init system is systemd --- LFS/master.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/LFS/master.sh b/LFS/master.sh index e89c08a..a742d0e 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -450,6 +450,25 @@ build_Makefile() { # all: ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report mk_BLFS_TOOL mk_CUSTOM_TOOLS @sudo make do_housekeeping +EOF +) >> $MKFILE +if [ "$INITSYS" = systemd ]; then +( + cat << EOF + @/bin/echo -e -n \\ + NAME=\\"Linux From Scratch\\"\\\\n\\ + VERSION=\\"$VERSION\\"\\\\n\\ + ID=lfs\\\\n\\ + PRETTY_NAME=\\"Linux From Scratch $VERSION\\"\\\\n\\ + VERSION_CODENAME=\\"$(whoami)-jhalfs\\"\\\\n\\ + > os-release && \\ + sudo mv os-release \$(MOUNT_PT)/etc && \\ + sudo chown root:root \$(MOUNT_PT)/etc/os-release +EOF +) >> $MKFILE +fi +( + cat << EOF @echo $VERSION > lfs-release && \\ sudo mv lfs-release \$(MOUNT_PT)/etc && \\ sudo chown root:root \$(MOUNT_PT)/etc/lfs-release