summaryrefslogtreecommitdiffstats
path: root/testModule/hooks/pre-mount
diff options
context:
space:
mode:
Diffstat (limited to 'testModule/hooks/pre-mount')
-rwxr-xr-xtestModule/hooks/pre-mount/fetch-config.sh39
-rwxr-xr-xtestModule/hooks/pre-mount/mount-qcow.sh49
2 files changed, 0 insertions, 88 deletions
diff --git a/testModule/hooks/pre-mount/fetch-config.sh b/testModule/hooks/pre-mount/fetch-config.sh
deleted file mode 100755
index a90481c8..00000000
--- a/testModule/hooks/pre-mount/fetch-config.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-# load dracut functions
-command -v getarg >/dev/null || . /lib/dracut-lib.sh
-
-# read SLX_SERVER and SLX_BASE from the kernel command line
-SLX_SERVER=$(getarg slxsrv)
-SLX_BASE=$(getarg slxbase)
-SLX_CONFIG_DIR="/opt/openslx"
-SLX_CONFIG_FILE="/opt/openslx/config"
-
-if [ -z "$SLX_SERVER" ]; then
- warn "No 'slxsrv' parameter found in the kernel command line!"
- warn "Skipping OpenSLX configuration..."
- return 1
-fi
-if [ -z "$SLX_BASE" ]; then
- warn "No 'slxbase' parameter found in the kernel command line!"
- warn "Skipping OpenSLX configuration..."
- return 1
-fi
-
-info "Getting configuration from OPENSLX-Server..."
-WGET="$(busybox which wget)"
-if [ -z $WGET ]; then
- # do nothing
- warn "'wget' not found. Skipping openslx configuration..."
- return 1
-fi
-
-# ok then we are ready to download the config
-mkdir -p "${SLX_CONFIG_DIR}"
-$WGET -T 5 -q "http://${SLX_SERVER}/${SLX_BASE}/config" -O "${SLX_CONFIG_FILE}"
-RET="$?"
-if [ $RET -ne 0 ]; then
- warn "Downloading OpenSLX configuration from ${SLX_SERVER}/${SLX_BASE} failed: $RET"
- emergency_shell -n "$0"
- return 1
-else
- return 0
-fi
diff --git a/testModule/hooks/pre-mount/mount-qcow.sh b/testModule/hooks/pre-mount/mount-qcow.sh
deleted file mode 100755
index d70492bf..00000000
--- a/testModule/hooks/pre-mount/mount-qcow.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-###############################################################################
-# CHECKS
-#
-
-SETUP_ROOTFS_SCRIPT="/sbin/setup-qcow2"
-
-if [ ! -e "${SETUP_ROOTFS_SCRIPT}" ]; then
- warn "No such file of directory: ${SETUP_ROOTFS_SCRIPT}"
- emergency_shell -n "Error in $0"
- return 1
-fi
-
-if [ ! -x "${SETUP_ROOTFS_SCRIPT}" ]; then
- warn "Cannot execute: ${SETUP_ROOTFS_SCRIPT}"
- emergency_shell -n "Error in $0"
- return 1
-fi
-
-#
-# END CHECKS
-###############################################################################
-
-###############################################################################
-# MAIN CODE
-#
-
-# ok, let's source the setup script
-if ! . ${SETUP_ROOTFS_SCRIPT} ; then
- warn "Could not source: ${SETUP_ROOTFS_SCRIPT}"
- emergency_shell -n "Error in $0"
- return 1
-fi
-
-# just go over the functions in the right order ;-)
-for fun in connect_dnbd3 create_qcow export_qcow connect_qcow; do
- if ! $fun; then
- # something failed, drop a shell for debugging
- warn "'$fun' failed with: $?"
- emergency_shell -n "Error in $fun"
- return 1
- fi
-done
-
-# all good, we are done
-return 0
-
-#
-# END MAIN CODE
-###############################################################################