From: Yu Watanabe Date: Sun, 14 Sep 2025 03:13:20 +0000 (+0900) Subject: mkosi: support the case /sbin/init is an absolute symbolic link X-Git-Tag: v259-rc1~546^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97eeecaa3caa9a78959577b657d7614f17f5e37b;p=thirdparty%2Fsystemd.git mkosi: support the case /sbin/init is an absolute symbolic link In that case, the link points to the host file, thus we cannot update the file. --- diff --git a/mkosi/mkosi.images/minimal-base/mkosi.postinst b/mkosi/mkosi.images/minimal-base/mkosi.postinst index 777bdfd449e..475f40fdc0c 100755 --- a/mkosi/mkosi.images/minimal-base/mkosi.postinst +++ b/mkosi/mkosi.images/minimal-base/mkosi.postinst @@ -3,6 +3,8 @@ set -e # We don't use mkosi.extra because /usr/sbin could be a symlink and cp doesn't handle that properly until # coreutils 9.5 or newer. +mkdir -p "$BUILDROOT/sbin" +rm -f "$BUILDROOT/sbin/init" cat >"$BUILDROOT/sbin/init" <