Commit fa6ff9bd authored by Anton Midyukov's avatar Anton Midyukov

init: fix 65-os-release for rescue also

copy script from features.in/init/rootfs/image-scripts.d/65-os-release
parent e5db0040
#!/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
rel_file=
for rel_file in altlinux-release os-release; do
if ! [ -e /etc/"$rel_file" ]; then
# in case it is dangling symlink
rm -f /etc/"$rel_file"
if [ -r /usr/share/branding-data-current/release/"$rel_file" ]; then
cp -at /etc -- \
/usr/share/branding-data-current/release/"$rel_file"
elif [ -r /usr/lib/"$rel_file" ]; then
cp -a /usr/lib/"$rel_file" /etc/"$rel_file"
fi
fi
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment