mirror of
https://github.com/systemd/systemd.git
synced 2026-11-08 06:16:55 +00:00
Commitedea370222(portable: remove drop-in configs even if the main unit file does not exist) taught detach to handle leftover .service.d directories after the main unit symlink was removed. portable_get_state_internal() still had the same blind spot: it only considered regular unit entries, so portablectl is-attached could report detached while a portable drop-in directory was still present. Handle those drop-in-only entries like detach does, preserve the existing unit-file based enabled checks when the main unit file is still present, and add TEST-29 coverage. Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com> (cherry picked from commita977bf4d06) (cherry picked from commit60cba9ebf8) (cherry picked from commit05b1275c72) (cherry picked from commita6abe0a3e4)