summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_export15
1 files changed, 4 insertions, 11 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_export b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_export
index 64d5f485..3d012360 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_export
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-mount_export
@@ -1,17 +1,10 @@
#!/bin/bash
-export PATH=$PATH:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin
+. /opt/openslx/config
-if grep "Ubuntu 13.04" "/etc/issue" >/dev/null; then
- EXPORT="132.230.8.113:/srv/ubuntu1304"
-elif grep "SUSE" "/etc/issue" >/dev/null; then
- EXPORT="132.230.8.113:/srv/suse"
-else
- echo "Could not determine System"
- exit 1
-fi
+[ -z "${SLX_STAGE4_NFS}" ] && { echo "SLX_STAGE4_NFS is not set in /opt/openslx/config." && exit 1; }
-echo "Mounting ${EXPORT} to /opt/openslx/mnt"
-mount -t nfs -o ro,async,nolock,vers=3 "$EXPORT" /opt/openslx/mnt || { echo "Fail." && exit 1; }
+echo "Mounting ${SLX_STAGE4_NFS} to /opt/openslx/mnt"
+mount -t nfs -o ro,async,nolock,vers=3 "$SLX_STAGE4_NFS" /opt/openslx/mnt || { echo "Fail." && exit 1; }
echo "Appending /opt/openslx/mnt to /"
mount -o remount,append:/opt/openslx/mnt=ro / || { echo "Fail." && exit 1; }