live, init: move 65-os-release from live to init

Install /etc/*-release files if needed.

Reported-by: Ivan A. Melnikov <iv@altlinux.org>
This commit is contained in:
Anton Midyukov 2019-11-04 23:48:48 +07:00 committed by Michael Shigorin
parent 5e20cec7e2
commit efa57b9121
3 changed files with 20 additions and 7 deletions

View File

@ -0,0 +1,10 @@
#!/bin/sh
# Install /etc/*-release files if needed
if [ -d /usr/share/branding-data-current ]; then
[ -e /etc/altlinux-release ] ||
cp -at /etc -- \
/usr/share/branding-data-current/release/altlinux-release
[ -e /etc/os-release ] ||
cp -at /etc -- \
/usr/share/branding-data-current/release/os-release
fi

View File

@ -0,0 +1,10 @@
#!/bin/sh
# Install /etc/*-release files if needed
if [ -d /usr/share/branding-data-current ]; then
[ -e /etc/altlinux-release ] ||
cp -at /etc -- \
/usr/share/branding-data-current/release/altlinux-release
[ -e /etc/os-release ] ||
cp -at /etc -- \
/usr/share/branding-data-current/release/os-release
fi

View File

@ -1,7 +0,0 @@
#!/bin/sh
# Install /etc/*-release files on live if needed
if [ -d /usr/share/branding-data-current ] && \
! [ -e /etc/altlinux-release ] && \
! [ -e /etc/os-release ]; then
cp -a /usr/share/branding-data-current/release/*-release /etc/
fi