@@ 427,12 427,19 @@ def editer(name, appended=None, prepande
] + added
if lowers == info['lowers']:
return
- if 'active' in _systemctl_status(info['automountpath'].name)['Active'].split():
+ automounted = _is_automount_active(info)
+ mounted = _is_mount_active(info)
+ if automounted:
sh.systemctl.stop(info['automountpath'].name)
+ if mounted:
+ sh.systemctl.stop(info['mountpath'].name)
info = _compute_info(name, lowers)
_write_info(info)
sh.systemctl('daemon-reload').wait()
- sh.systemctl.start(info['automountpath'].name)
+ if automounted:
+ sh.systemctl.start(info['automountpath'].name)
+ if mounted:
+ sh.systemctl.start(info['automount'].name)
logger.debug("Systemd \"%s\" restarted", info['automountpath'])
logger.info("\"%s\" updated", info['name'])