summaryrefslogtreecommitdiffstats
path: root/PCBSD/pc-sysinstall/backend-query/test-live.sh
diff options
context:
space:
mode:
Diffstat (limited to 'PCBSD/pc-sysinstall/backend-query/test-live.sh')
-rwxr-xr-xPCBSD/pc-sysinstall/backend-query/test-live.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/PCBSD/pc-sysinstall/backend-query/test-live.sh b/PCBSD/pc-sysinstall/backend-query/test-live.sh
new file mode 100755
index 0000000..67ec7a5
--- /dev/null
+++ b/PCBSD/pc-sysinstall/backend-query/test-live.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Script which checks if we are running from install media, or real system
+#############################################################################
+
+dmesg | grep "md0: Preloaded image" >/dev/null 2>/dev/null
+if [ "$?" = "0" ]
+then
+ echo "INSTALL-MEDIA"
+ exit 0
+else
+ echo "REAL-DISK"
+ exit 1
+fi
+
OpenPOWER on IntegriCloud