diff options
Diffstat (limited to 'PCBSD')
-rwxr-xr-x | PCBSD/pc-sysinstall/backend-query/test-live.sh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/PCBSD/pc-sysinstall/backend-query/test-live.sh b/PCBSD/pc-sysinstall/backend-query/test-live.sh index 539f774..87fb45c 100755 --- a/PCBSD/pc-sysinstall/backend-query/test-live.sh +++ b/PCBSD/pc-sysinstall/backend-query/test-live.sh @@ -2,13 +2,23 @@ # Script which checks if we are running from install media, or real system ############################################################################# -mount | grep "/dev/iso9660/pfSense" >/dev/null 2>/dev/null +# Test for PC-BSD Style mount +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 +# Test for pfSense LIVECD +mount | grep "/dev/iso9660/pfSense" >/dev/null 2>/dev/null +if [ "$?" = "0" ] +then + echo "pfSense-LiveCD/Installer" + exit 0 +fi + +echo "REAL-DISK" +exit 1 + + |