Skip to content
Snippets Groups Projects
Commit 3d26c2ee authored by Daan De Meyer's avatar Daan De Meyer
Browse files

Add symlink from /etc/os-release to /usr/lib/os-release

From the systemd os-release man page:

> /etc/os-release should be a relative symlink to /usr/lib/os-release,
> to provide compatibility with applications only looking at /etc/.

While systemd ships a tmpfiles dropin that will make the symlink, when
building e.g. portable service images, those might not have systemd
itself, and thus won't have the tmpfiles dropin. To make sure all Arch
images have the symlink, let's create it as part of the filesystem package
since we already ship /usr/lib/os-release in the filesystem package as
well.

We do this in a install script to avoid messing with any existing
/etc/os-release files or symlinks. For safety we only create the file
symlink if /etc/os-release is not yet a symlink and doesn't exist.
parent f71dd957
Branches os-release
No related tags found
No related merge requests found
......@@ -81,3 +81,4 @@ pkgbase = filesystem
sha256sums = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
pkgname = filesystem
install = filesystem.install
......@@ -10,6 +10,7 @@ arch=('any')
license=('GPL-3.0-or-later')
url='https://archlinux.org'
depends=('iana-etc')
install='filesystem.install'
backup=(
'etc/crypttab'
'etc/fstab'
......
#!/bin/sh
post_install() {
[ ! -L /etc/os-release ] && [ ! -e /etc/os-release ] && ln -s ../usr/lib/os-release /etc/os-release
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment