Commit 1754b3b0 authored by Mikhail Efremov's avatar Mikhail Efremov Committed by Anton Midyukov

init: Fix 65-os-release

Handle /usr/lib/os-release if it exists.
parent 6c53cd86
#!/bin/sh
# Install /etc/*-release files if needed
if [ -d /usr/share/branding-data-current ]; then
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"
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
done
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