mount-home: try a fix for a `OneShot` service type
The previous code was producing:
[INFO ] Running state [mount-home] at time 15:38:33.808236
[INFO ] Executing state service.running for [mount-home]
[DEBUG ] LazyLoaded cmd.run_all
[INFO ] Executing command [u'systemctl', 'status', u'mount-home.service', u'-n', u'0'] in directory '/root'
[DEBUG ] stdout: * mount-home.service - Mount home for non PIE users
Loaded: loaded (/etc/systemd/system/mount-home.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Sun 2020-05-03 18:49:47 CEST; 20h ago
Process: 1109 ExecStart=/usr/bin/mount -L home /home (code=exited, status=1/FAILURE)
Main PID: 1109 (code=exited, status=1/FAILURE)
[DEBUG ] retcode: 3
[INFO ] Executing command [u'systemctl', 'is-active', u'mount-home.service'] in directory '/root'
[DEBUG ] stdout: inactive
[DEBUG ] retcode: 3
[INFO ] Executing command [u'systemctl', 'is-enabled', u'mount-home.service'] in directory '/root'
[DEBUG ] stdout: enabled
[INFO ] Executing command [u'systemd-run', u'--scope', u'systemctl', 'start', u'mount-home.service'] in directory '/root'
The service mount-home
is a OneShot service so it's not intended to stay in a runnning
state. So by using the Enabled
state, it might behave as intended.