append variables to /etc/os-release

This commit is contained in:
Bruce Leidl 2019-01-05 22:38:18 -05:00
parent f8a785e687
commit caf17ee1c5

View File

@ -4,7 +4,7 @@ LICENSE = "MIT"
SYSTEMD_DEFAULT_TARGET = "graphical.target"
ROOTFS_POSTPROCESS_COMMAND += "set_citadel_user_password; write_etc_citadel_channel; symlink_lib64; setup_var; "
ROOTFS_POSTPROCESS_COMMAND += "set_citadel_user_password; write_etc_citadel_channel; symlink_lib64; setup_var; append_os_release;"
IMAGE_INSTALL += "\
packagegroup-citadel-base \
@ -68,6 +68,11 @@ setup_var() {
ln -sf ../usr/share/factory/var/lib ${IMAGE_ROOTFS}/var/lib
}
append_os_release() {
echo "CITADEL_CHANNEL=\"${CITADEL_IMAGE_CHANNEL}\"" >> ${IMAGE_ROOTFS}/etc/os-release
echo "CITADEL_ROOTFS_VERSION=\"${CITADEL_IMAGE_VERSION_rootfs}\"" >> ${IMAGE_ROOTFS}/etc/os-release
}
do_rm_var_link() {
rm ${IMAGE_ROOTFS}/var/lib
}