summaryrefslogtreecommitdiffstats
path: root/scripts/anaconda-cleanup
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2011-03-11 12:36:31 -0600
committerDavid Lehman <dlehman@redhat.com>2011-03-14 20:59:39 -0500
commitc92a3e40bab1b89a9b85b1c7fc1329e369f77206 (patch)
tree703823ae21f9908747554cf6a3ec6df3cfe470aa /scripts/anaconda-cleanup
parent775c5484fd024001aa1ce9478f271d7480150301 (diff)
downloadanaconda-c92a3e40bab1b89a9b85b1c7fc1329e369f77206.tar.gz
anaconda-c92a3e40bab1b89a9b85b1c7fc1329e369f77206.tar.xz
anaconda-c92a3e40bab1b89a9b85b1c7fc1329e369f77206.zip
Detect live environment if no args passed to anaconda-cleanup.
Diffstat (limited to 'scripts/anaconda-cleanup')
-rwxr-xr-xscripts/anaconda-cleanup3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/anaconda-cleanup b/scripts/anaconda-cleanup
index 9b228ade0..528b530ab 100755
--- a/scripts/anaconda-cleanup
+++ b/scripts/anaconda-cleanup
@@ -60,6 +60,9 @@ for dev in os.listdir(sys_class_block):
loop = os.listdir("%s/%s/slaves" % (sys_class_block, dev))[0].strip()
storage_config.diskImages[name] = devicelibs.loop.get_backing_file(loop)
+if not image_install:
+ live_install = live_install or os.path.exists("/dev/live")
+
if not image_install and not live_install:
print >> sys.stderr, "not a live install or an image install -- exiting"
sys.exit(1)