r3898 - jhalfs/branches/new_features/LFS

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Fri Mar 3 13:13:38 PST 2017


Author: pierre
Date: Fri Mar  3 13:13:38 2017
New Revision: 3898

Log:
Output /etc/os-release when the init system is systemd

Modified:
   jhalfs/branches/new_features/LFS/master.sh

Modified: jhalfs/branches/new_features/LFS/master.sh
==============================================================================
--- jhalfs/branches/new_features/LFS/master.sh	Thu Mar  2 08:40:34 2017	(r3897)
+++ jhalfs/branches/new_features/LFS/master.sh	Fri Mar  3 13:13:38 2017	(r3898)
@@ -450,6 +450,25 @@
 
 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


More information about the alfs-log mailing list