Commit 4d72299f authored by Vinicius Ruoso's avatar Vinicius Ruoso

Moved lock file check before nologin file creation on prd_fixraid

This modification prevent the creation of file /etc/nologin when the
fix home script will be aborted by some already created lock file.
Signed-off-by: default avatarVinicius Ruoso <vkr07@c3sl.ufpr.br>
parent 7363583a
......@@ -28,6 +28,12 @@ function fixhome(){
if test $TIME -ge 22; then
print "FIXHOME: STARTING (SMALLER DISK IS $SMALL)"
# lock will prevent simultaneous execute
# the rsync can take some time
LOCK="/tmp/.sdi.fixraid.lock"
test -f "$LOCK" && return 1
touch "$LOCK" &> /dev/null
# get the other disk to re-create the raid later
# and check the size diference: > 5Gb we abort
if test "$SMALL" = "sda"; then
......@@ -56,12 +62,6 @@ Por favor, aguarde alguns minutos.
Equipe C3SL, UFPR
EOF
# lock will prevent simultaneous execute
# the rsync can take some time
LOCK="/tmp/.sdi.fixraid.lock"
test -f "$LOCK" && return 1
touch "$LOCK" &> /dev/null
# run the fix routine
FAILED=1
mknod /dev/md5 b 9 5 &> /dev/null
......
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