Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
mkimage-profiles
Commits
75075cc6
Commit
75075cc6
authored
May 18, 2021
by
Mikhail Efremov
Committed by
Anton Midyukov
Oct 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init: Fix /etc/*-release files installation
Handle dangling symlinks.
parent
6595fbb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
65-os-release
features.in/init/rootfs/image-scripts.d/65-os-release
+9
-6
No files found.
features.in/init/rootfs/image-scripts.d/65-os-release
View file @
75075cc6
#!/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
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/
"
$rel_file
"
fi
done
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment