summaryrefslogtreecommitdiffstats
path: root/testModule/hooks/pre-mount/fetch-config.sh
diff options
context:
space:
mode:
authorJonathan Bauer2015-05-27 16:32:57 +0200
committerJonathan Bauer2015-05-27 16:32:57 +0200
commit0abace2bbec9e17a3630c463e4e3c329c967334b (patch)
tree986a9bebd62c2dd596c85bf44bbec68d00cccd13 /testModule/hooks/pre-mount/fetch-config.sh
parentremoved hacked systemd rpms and grub2.conf (diff)
downloadsystemd-init-0abace2bbec9e17a3630c463e4e3c329c967334b.tar.gz
systemd-init-0abace2bbec9e17a3630c463e4e3c329c967334b.tar.xz
systemd-init-0abace2bbec9e17a3630c463e4e3c329c967334b.zip
restructuring & bit of documentation ;)
dracut module now in 'dnbd3-qcow2-rootfs'. ALLLLL dracut related stuff goes in here!
Diffstat (limited to 'testModule/hooks/pre-mount/fetch-config.sh')
-rwxr-xr-xtestModule/hooks/pre-mount/fetch-config.sh39
1 files changed, 0 insertions, 39 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