summaryrefslogtreecommitdiffstats
path: root/pbmtk.sh
diff options
context:
space:
mode:
authorMichael Neves2012-01-27 15:03:56 +0100
committerMichael Neves2012-01-27 15:03:56 +0100
commit8e8af091fd55501dcbab42836726cd25a494c077 (patch)
tree1af1be3fa81ca5196f5a7dba0e0df8218bde2cc5 /pbmtk.sh
parentadded boot media type in kcl of preboot environment (diff)
downloadusb-boot-stick-8e8af091fd55501dcbab42836726cd25a494c077.tar.gz
usb-boot-stick-8e8af091fd55501dcbab42836726cd25a494c077.tar.xz
usb-boot-stick-8e8af091fd55501dcbab42836726cd25a494c077.zip
pbs-serials added
Diffstat (limited to 'pbmtk.sh')
-rwxr-xr-xpbmtk.sh79
1 files changed, 79 insertions, 0 deletions
diff --git a/pbmtk.sh b/pbmtk.sh
new file mode 100755
index 0000000..0e6bc8c
--- /dev/null
+++ b/pbmtk.sh
@@ -0,0 +1,79 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# Copyright (c) 2011 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# PreBoot Media ToolKit
+# -----------------------------------------------------------------------------
+
+ROOT_DIR=$(dirname $(readlink -f $0))
+SELF=$(readlink -f $0)
+
+SUBMODULE=$1
+shift
+
+. $ROOT_DIR/inc/functions.common.sh
+
+print_module_usage() {
+ echo "Toolkit for creating PreBoot Media for OpenSLX NG (pbmtk)"
+ echo "Usage: $(basename $SELF) MODULE [OPTIONS]"
+ echo "Modules:"
+ echo -e " env \t fetch, update, recreate kernel/initramfs"
+ echo -e " iso \t create preboot isos"
+ echo -e " usb \t create preboot usb sticks"
+ echo -e " installer \t create self-extracting installers"
+ echo -e " pbs-serials \t query all Serials available to Member"
+ echo -e " pbs-register\t register preboot with pbs"
+ echo -e " pbs-upload \t upload usb-installer/iso to usb"
+ echo "For more help run: $(basename $SELF) MODULE --help"
+}
+
+banner
+
+if [ "x$SUBMODULE" = "xenv" ]; then
+ echo -e "Module: ENV"
+ . $ROOT_DIR/inc/functions.env.sh
+elif [ "x$SUBMODULE" = "xiso" ]; then
+ echo -e "Module: PreBoot-ISO Creator"
+ . $ROOT_DIR/inc/functions.iso.sh
+elif [ "x$SUBMODULE" = "xusb" ]; then
+ echo -e "Module: PreBoot-USB-Stick Creator"
+ . $ROOT_DIR/inc/functions.usb.sh
+elif [ "x$SUBMODULE" = "xinstaller" ]; then
+ echo -e "Module: PreBoot-Media Installer Creator"
+ . $ROOT_DIR/inc/functions.create-installer.sh
+elif [ "x$SUBMODULE" = "xpbs-serials" ]; then
+ echo -e "Module: PBS Serial Query"
+ . $ROOT_DIR/inc/functions.pbs-serials.sh
+elif [ "x$SUBMODULE" = "xpbs-register" ]; then
+ echo -e "Module: PBS Serial Registrator"
+ . $ROOT_DIR/inc/functions.pbs-register.sh
+elif [ "x$SUBMODULE" = "xpbs-upload" ]; then
+ echo -e "Module: PBS Preboot Uploader"
+ . $ROOT_DIR/inc/functions.pbs-upload.sh
+elif [ "x$SUBMODULE" = "x--version" -o "x$SUBMODULE" = "x-v" ]; then
+ echo -e "Module: Version"
+ exit 1
+else
+ print_module_usage
+ exit 1
+fi
+
+init_params
+
+mkdir -p $LOG_DIR/
+
+run_global_checks
+
+read_params $@
+
+run_module_checks
+
+run