[SCM] Debian Live build scripts branch, master, updated. 1.0.1-1-76-g4de79b6

Daniel Baumann daniel at debian.org
Mon Nov 3 11:16:00 UTC 2008


The following commit has been merged in the master branch:
commit ce69acdb3e104bcc9f5f0e2673dd338cdfda30f5
Author: Daniel Baumann <daniel at debian.org>
Date:   Sat Nov 1 14:40:21 2008 +0100

    Syncing internal lockfile functions.

diff --git a/functions/lockfile.sh b/functions/lockfile.sh
index 93da69e..c4010fb 100755
--- a/functions/lockfile.sh
+++ b/functions/lockfile.sh
@@ -11,10 +11,15 @@ Check_lockfile ()
 {
 	FILE="${1}"
 
+	if [ -z "${FILE}" ]
+	then
+		FILE="/var/lock/${PROGRAM}.lock"
+	fi
+
 	# Checking lock file
 	if [ -f "${FILE}" ]
 	then
-		Echo_error "system locked"
+		Echo_error "${PROGRAM} locked"
 		exit 1
 	fi
 }
@@ -22,7 +27,13 @@ Check_lockfile ()
 Create_lockfile ()
 {
 	FILE="${1}"
-	DIRECTORY="$(dirname ${1})"
+
+	if [ -z "${FILE}" ]
+	then
+		FILE="/var/lock/${PROGRAM}.lock"
+	fi
+
+	DIRECTORY="$(dirname ${FILE})"
 
 	# Creating lock directory
 	mkdir -p "${DIRECTORY}"

-- 
Debian Live build scripts



More information about the debian-live-changes mailing list