[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Allow running an alternate program from liveinst.



This allows the storage testing code to make use of all the special setup and
teardown inside liveinst.  Also, don't unmount /mnt/anactest from the liveinst
loop or the driver will not be found.
---
 data/liveinst/liveinst |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst
index 95bd35f..b50e9bb 100755
--- a/data/liveinst/liveinst
+++ b/data/liveinst/liveinst
@@ -44,8 +44,10 @@ if [ -n "$DISPLAY" -a -n "$LANG" ]; then
     INSTLANG="--lang $LANG"
 fi
 
-# eventually, we might want to allow a more "normal" install path
-ANACONDA="/usr/sbin/anaconda --liveinst --method=livecd://$LIVE_BLOCK $INSTLANG"
+# Allow running another command in the place of anaconda, but in this same
+# environment.  This allows storage testing to make use of all the module
+# loading and lvm control in this file, too.
+ANACONDA=${LIVECMD:=/usr/sbin/anaconda --liveinst --method=livecd://$LIVE_BLOCK $INSTLANG}
 
 if [ -x /usr/sbin/setenforce -a -e /selinux/enforce ]; then
     current=$(cat /selinux/enforce)
@@ -57,8 +59,13 @@ if [ ! -e /selinux/load ]; then
 fi
 
 # devkit-disks is now mounting lots of stuff.  for now, let's just try to unmount it all
-umount /media/*
+umount /media/* 2>/dev/null
 tac /proc/mounts | grep ^/dev | grep -v live | while read dev mntpoint rest; do
+    # hack - don't unmount devices the storage test code requires
+    if [ "$mntpoint" = "/mnt/anactest" ]; then
+       continue
+    fi
+
     if [ -b $dev ]; then
        umount $mntpoint 2>/dev/null
     fi
-- 
1.7.0.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]