Commit 75075cc6 authored by Mikhail Efremov's avatar Mikhail Efremov Committed by Anton Midyukov

init: Fix /etc/*-release files installation

Handle dangling symlinks.
parent 6595fbb3
#!/bin/sh
# Install /etc/*-release files if needed
if [ -d /usr/share/branding-data-current ]; then
[ -e /etc/altlinux-release ] ||
local 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"
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
/usr/share/branding-data-current/release/"$rel_file"
fi
done
fi
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