diff --git a/mklive.conf.example b/mklive.conf.example index 5b7eef2..d163188 100644 --- a/mklive.conf.example +++ b/mklive.conf.example @@ -25,6 +25,9 @@ STAGEDIR="./stage" CHROOT="./chroot" +#do we want to build an iso +ISO="true" + #iso filename - gets extended by .iso ISO_FILENAME="live" @@ -41,6 +44,8 @@ ISO_INCLUDE_UBUNTU_INSTALLER="true" ISO_INCLUDE_DEBIAN_INSTALLER="true" +#do we want to build a PXE environment +PXE="true" #Include Memtest PXE_INCLUDE_MEMTEST="true" diff --git a/scripts/defaults.conf b/scripts/defaults.conf index 2bd79ac..6eac9ea 100644 --- a/scripts/defaults.conf +++ b/scripts/defaults.conf @@ -5,4 +5,3 @@ ARCH_BASEDIR="archiso/arch" PXE_HTTP_PORT=80 ARCHISO_HTTP_PORT=80 LIVE_SSH_ROOTLOGIN="yes" - diff --git a/scripts/functions.sh b/scripts/functions.sh index abef776..05db328 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -11,7 +11,7 @@ NC='\033[0m' requiredir() { - [ -n "$1" ] || exit 1 + [ -n "$1" ] || return 1 [ -e $1 ] || mkdir $1 } diff --git a/scripts/iso.sh b/scripts/iso.sh index 037e540..c6989d1 100755 --- a/scripts/iso.sh +++ b/scripts/iso.sh @@ -11,6 +11,8 @@ einfo "Creating ISO" ISOLINUX_MODULES="ldlinux.c32 libmenu.c32 menu.c32" ISOLINUX_BIN="/usr/lib/ISOLINUX/isolinux.bin" +[ "$ISO" == "true" ] || ( einfo "ISO build is not enabled - skip" && exit 0 ) + checkstage live || eexit "Previous stage (live) was not finished" startstage iso diff --git a/scripts/pxe.sh b/scripts/pxe.sh index 7877bc7..20ab37c 100755 --- a/scripts/pxe.sh +++ b/scripts/pxe.sh @@ -14,6 +14,8 @@ einfo "Creating PXE enviroment" PXELINUX_MODULES="libmenu.c32 menu.c32" PXELINUX_BIN="/usr/lib/PXELINUX/pxelinux.0" + +[ "$PXE" == "true" ] || (einfo "PXE disabled" && exit 0) checkstage live || eexit "Previous stage (live) was not finished" startstage pxe