elements/dib-init-system: fail to detect init system in some gentoo guest configurations

Bug #1822574 reported by Raimonds Cicans
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
New
Undecided
Unassigned

Bug Description

diskimage-builder: 2.20.3
Host OS: Gentoo (amd64)
Guest OS: Gentoo (amd64)

Problem: guest building fails early if variable GENTOO_PROFILE is set and it does _NOT_ contain word "systemd"

Cause: bug in elements/dib-init-system/dib-init-system

Description:
elements/dib-init-system/dib-init-system miss "else" for following statement:
if [[ "${GENTOO_PROFILE}" =~ systemd ]]; then
    echo "systemd"
fi

Fix: add "else" statement:
if [[ "${GENTOO_PROFILE}" =~ systemd ]]; then
    echo "systemd"
else
    echo "openrc"
fi

Hmmm... IMHO it would be nice to have some environment variable to override auto-detection...

Tags: gentoo
Revision history for this message
Raimonds Cicans (raycic) wrote :

Sorry, I'm wrong.

Hmmm... It looks there are several bugs mixed.

Guest VM build fails early if "--no-tmpfs" CLI parameter used or GENTOO_PROFILE contains "hardened" (which automatically turns on "--no-tmpfs").

Revision history for this message
Raimonds Cicans (raycic) wrote :

Fails was caused by #1822670

Code mentioned in comments above is little bit more buggy.
Patch attached.

I do not know how this bug affect Gentoo guest building - I still have other errors which do not allow to finish Gentoo guest building.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.