summaryrefslogtreecommitdiff
path: root/meta-virtualization-extra/classes/enable-linger.bbclass
blob: cfb21e789bac33f5c55aaa218f658fec8f709edc (plain)
1
2
3
4
5
6
7
8
9
10
11
do_install:append() {
    # If linger is not enabled then rootless podman 
    # commands will complain with number of warnings.
    # Enabling linger does two effects for systemd user units:
    #   1. Units are automatically started after a reboot
    #   2. Units are not automatically stopped after a log out
    install -d ${D}${localstatedir}/lib/systemd/linger
    touch ${D}${localstatedir}/lib/systemd/linger/${USER_TO_ADD_NAME}
}

FILES:${PN}:append = " ${localstatedir}/lib/systemd/linger/${USER_TO_ADD_NAME}"