From 3d99ee74d0d3df3e3bc72e2bbda413d50c5c19ef Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 23 May 2010 00:03:20 -0400 Subject: Customize for both PC-BSD and pfSense --- PCBSD/pc-sysinstall/backend-query/test-live.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'PCBSD/pc-sysinstall') 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 + + -- cgit v1.1