lcd-message: Rework lock management so it works on debian/dash as well