init: Fix 65-os-release
Handle /usr/lib/os-release if it exists.
This commit is contained in:
parent
6c53cd86ad
commit
1754b3b02e
@ -1,13 +1,15 @@
|
||||
#!/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
|
||||
|
Loading…
Reference in New Issue
Block a user