summaryrefslogtreecommitdiff
path: root/scripts/00-init.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:20 +0200
committerDaniel Baumann <daniel@debian.org>2007-09-23 10:04:20 +0200
commiteeaafbe5c0d5f2ffd87bf7d9f12c13df1bd0adf5 (patch)
tree18151396add367542887fe7f017025538e3318d6 /scripts/00-init.sh
downloadlive-build-eeaafbe5c0d5f2ffd87bf7d9f12c13df1bd0adf5.zip
live-build-eeaafbe5c0d5f2ffd87bf7d9f12c13df1bd0adf5.tar.gz
Adding live-package 0.99-1.
Diffstat (limited to 'scripts/00-init.sh')
-rw-r--r--scripts/00-init.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/00-init.sh b/scripts/00-init.sh
new file mode 100644
index 0000000..43aa251
--- /dev/null
+++ b/scripts/00-init.sh
@@ -0,0 +1,18 @@
+# scripts/00-init.sh
+
+Init ()
+{
+ # Check if user is root
+ if [ "`id -u`" -ne "0" ]
+ then
+ echo "E: ${PROGRAM} requires superuser privilege."
+ exit 1
+ fi
+
+ # Check if build directory already exists
+ if [ -d "${LIVE_ROOT}" ] && [ ! -d "${LIVE_ROOTFS}" ]
+ then
+ echo "E: found an (unfinished) system, remove it and re-run ${PROGRAM}."
+ exit 1
+ fi
+}