Commit 73a24127 authored by Eugene Kolomeetz's avatar Eugene Kolomeetz Committed by Pavel Emelyanov

scripts: return non zero if save_mountpoint() fails

In such case, we must not proceed: without saved mountpoint, we risk
losing data when restarting automount service (think about tmpfs).
Currently, zero will be returned as exit status of preceeding echo.
https://jira.sw.ru/browse/PSBM-44207Signed-off-by: 's avatarEugene Kolomeetz <klm@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 00f8b63b
...@@ -96,7 +96,7 @@ function save_mountpoint { ...@@ -96,7 +96,7 @@ function save_mountpoint {
bindmount=$($JOIN_CT mktemp -d) bindmount=$($JOIN_CT mktemp -d)
if [ -z "$bindmount" ]; then if [ -z "$bindmount" ]; then
echo "Failed to create temporary directory" echo "Failed to create temporary directory"
return return 1
fi fi
# No need to unmount fs on top of autofs: # No need to unmount fs on top of autofs:
......
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