diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:20 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:20 +0200 |
commit | eeaafbe5c0d5f2ffd87bf7d9f12c13df1bd0adf5 (patch) | |
tree | 18151396add367542887fe7f017025538e3318d6 /scripts/00-init.sh | |
download | vyos-live-build-eeaafbe5c0d5f2ffd87bf7d9f12c13df1bd0adf5.tar.gz vyos-live-build-eeaafbe5c0d5f2ffd87bf7d9f12c13df1bd0adf5.zip |
Adding live-package 0.99-1.
Diffstat (limited to 'scripts/00-init.sh')
-rw-r--r-- | scripts/00-init.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/00-init.sh b/scripts/00-init.sh new file mode 100644 index 000000000..43aa2512d --- /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 +} |