init.d/vz-redhat: fix errorneous lockfile removal

Commit 3ec48156c added trap statement to lockfile() to make sure
there is no lock file left after script finishes. Unfortunately,
this works even in the case when we report that OpenVZ is locked.

Fix by cleaning the trap in case we're already locked.

http://bugzilla.openvz.org/2342

Reported-by: Pavel Odintsov <pavel.odintsov@gmail.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed