The reason for the lock failure is now indicated in the failure message.

This commit is contained in:
nekral-guest
2011-07-14 17:25:48 +00:00
parent b1dcbb9109
commit 17589834e9
9 changed files with 10 additions and 1 deletions
@@ -1 +1,2 @@
grpconv: lock /etc/group.lock already used by PID <PID>
grpconv: cannot lock /etc/group; try again later.
@@ -17,7 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/group.lock' 0
change_config
echo -n "Create lock file for /etc/group..."
touch /etc/group.lock
echo -n $$ > /etc/group.lock
echo "done"
echo -n "Convert the group files (grpconv)..."
@@ -39,6 +39,7 @@ echo "======================================================================="
cat tmp/grpconv.err
echo "======================================================================="
echo -n "Check that there were a failure message..."
sed -i -e "s/$$/<PID>/" tmp/grpconv.err
diff -au data/grpconv.err tmp/grpconv.err
echo "error message OK."
rm -f tmp/grpconv.err
@@ -1 +1,2 @@
grpconv: existing lock file /etc/gshadow.lock without a PID
grpconv: cannot lock /etc/gshadow; try again later.
@@ -1 +1,2 @@
grpunconv: existing lock file /etc/group.lock without a PID
grpunconv: cannot lock /etc/group; try again later.
@@ -1 +1,2 @@
grpunconv: existing lock file /etc/gshadow.lock without a PID
grpunconv: cannot lock /etc/gshadow; try again later.
@@ -1 +1,2 @@
pwconv: existing lock file /etc/passwd.lock without a PID
pwconv: cannot lock /etc/passwd; try again later.
@@ -1 +1,2 @@
pwconv: existing lock file /etc/shadow.lock without a PID
pwconv: cannot lock /etc/shadow; try again later.
@@ -1 +1,2 @@
pwunconv: existing lock file /etc/passwd.lock without a PID
pwunconv: cannot lock /etc/passwd; try again later.
@@ -1 +1,2 @@
pwunconv: existing lock file /etc/shadow.lock without a PID
pwunconv: cannot lock /etc/shadow; try again later.