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 #!/bin/sh
# Install /etc/*-release files if needed # Install /etc/*-release files if needed
if [ -d /usr/share/branding-data-current ]; then if [ -d /usr/share/branding-data-current ]; then
[ -e /etc/altlinux-release ] || local rel_file=
cp -at /etc -- \ for rel_file in altlinux-release os-release; do
/usr/share/branding-data-current/release/altlinux-release if ! [ -e /etc/"$rel_file" ]; then
[ -e /etc/os-release ] || # in case it is dangling symlink
cp -at /etc -- \ rm -f /etc/"$rel_file"
/usr/share/branding-data-current/release/os-release cp -at /etc -- \
/usr/share/branding-data-current/release/"$rel_file"
fi
done
fi 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