sleep 0.25
done
- if ! ${free}; then
- log ERROR "Could not acquire lock '${lockfile}'"
- return ${EXIT_ERROR}
- fi
-
- assert [ ! -e "${lockfile}" ]
+ assert ${free} "Could not acquire lock '${lockfile}'"
# Write out pid to the lockfile and make sure that
# nobody else can access it.
device_exists ${INTERFACE} || exit ${EXIT_ERROR}
# Acquiring lock for this operation.
-lock_acquire ${LOCKFILE} || exit ${EXIT_ERROR}
+lock_acquire ${LOCKFILE}
# Check if the device is already in use and
# prevent the script to touch it in any way.