scripts: save and restore target mount for autofs service
This patch slightly changes the logic on systemd autofs service restart script: 1) It tries to bind-mount the mountpoint on top of autofs (if any) somewhere before service restart, and replace new mount point on top of autofs (if any) by the saved one after. 2) It doesn't exit in case of error, trying to recover as much as possible in case of failure instead and then continue services restarting. The reason for introducing new logic is that there can be some other, stateful, file system on top of autofs (say, tmpfs), which state was restore during migration. With current script this state will be lost, while this patch allows to preserve restored mount point after service restart. Signed-off-by:Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
Please
register
or
sign in
to comment