Merge "new_features" branch r3898:

output /etc/os-release when the init system is systemd
This commit is contained in:
Pierre Labastie 2017-03-03 21:16:40 +00:00
parent 84440e673d
commit df97e687b5

View file

@ -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