Commit 63d61425 authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

scripts: join pid namespace in systemd-autofs-restart.sh

Without correct pid namespace systemctl is not able to determine whether
autofs is active or not.
The reason is unaccessible proc due to mount namespace change without pid
namespace change.
Signed-off-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 820c9d06
...@@ -34,7 +34,7 @@ if [ ! -x $NS_ENTER ]; then ...@@ -34,7 +34,7 @@ if [ ! -x $NS_ENTER ]; then
exit 2 exit 2
fi fi
JOIN_CT="$NS_ENTER -t $CRTOOLS_INIT_PID -m -u" JOIN_CT="$NS_ENTER -t $CRTOOLS_INIT_PID -m -u -p"
# Skip container, if it's not systemd based # Skip container, if it's not systemd based
[ $($JOIN_CT basename -- $(readlink /proc/1/exe)) == "systemd" ] || exit 0 [ $($JOIN_CT basename -- $(readlink /proc/1/exe)) == "systemd" ] || exit 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment