Skip to content
Commit 40682f15 authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov
Browse files

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: default avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 72d63211
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment