Commit c295ac7 1 parent b9902ab commit c295ac7 Copy full SHA for c295ac7
File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -657,6 +657,9 @@ vm_detect_2nd_stage() {
657
657
mount -orw -n -t securityfs securityfs /sys/kernel/security 2>/dev/null || :
658
658
fi
659
659
660
+ # delete dummy /etc/os-release file
661
+ test -e /etc/os-release -a ! -s /etc/os-release && rm -f /etc/os-release
662
+
660
663
# qemu inside of xen does not work, check again with kvm later before enabling this
661
664
# if test -e /dev/kqemu ; then
662
665
# # allow abuild user to run qemu
@@ -1073,6 +1076,11 @@ vm_first_stage() {
1073
1076
fi
1074
1077
1075
1078
if test -n "$VM_ROOT" ; then
1079
+ # create an empty os-release file unless it already exists. newer systemd version insist
1080
+ # will not switch to the root unless it exists
1081
+ if test ! -L "$BUILD_ROOT/etc/os-release" -a ! -e "$BUILD_ROOT/etc/os-release" ; then
1082
+ touch "$BUILD_ROOT/etc/os-release"
1083
+ fi
1076
1084
# copy out kernel & initrd (if they exist) during unmounting VM image
1077
1085
KERNEL_TEMP_DIR=
1078
1086
local vm_type="$VM_TYPE"
You can’t perform that action at this time.
0 commit comments