diff options
author | Brian C. Lane <bcl@redhat.com> | 2013-02-06 16:09:51 -0800 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2013-02-08 10:13:07 -0800 |
commit | 151ebab12ecb6bb7eebd6ca35b8d10ec25ccde16 (patch) | |
tree | 9653fadcc0a1d9a5d7490da4bef6b3c2076a6ddb /pyanaconda | |
parent | 20b027211e466c48266cadb9f3ad60650dabdc66 (diff) | |
download | anaconda-151ebab12ecb6bb7eebd6ca35b8d10ec25ccde16.tar.gz anaconda-151ebab12ecb6bb7eebd6ca35b8d10ec25ccde16.tar.xz anaconda-151ebab12ecb6bb7eebd6ca35b8d10ec25ccde16.zip |
Add --dirinstall command
This disables the storage spoke and installs to /mnt/sysimage without
mounting any filesystems. If something is already mounted on
/mnt/sysimage it leaves it untouched.
This can be useful for utilities like livemedia-creator which will mount
a filesystem image on the directory and then run anaconda to install to
it.
Diffstat (limited to 'pyanaconda')
-rw-r--r-- | pyanaconda/flags.py | 5 | ||||
-rw-r--r-- | pyanaconda/install.py | 10 | ||||
-rw-r--r-- | pyanaconda/ui/gui/spokes/storage.py | 4 | ||||
-rw-r--r-- | pyanaconda/ui/tui/spokes/storage.py | 4 |
4 files changed, 19 insertions, 4 deletions
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py index fdbd504f1..7fb3a780a 100644 --- a/pyanaconda/flags.py +++ b/pyanaconda/flags.py @@ -67,6 +67,7 @@ class Flags(object): self.noverifyssl = False self.imageInstall = False self.automatedInstall = False + self.dirInstall = False # for non-physical consoles like some ppc and sgi altix, # we need to preserve the console device and not try to # do things like bogl on them. this preserves what that @@ -190,6 +191,10 @@ def can_touch_runtime_system(msg): log.info("Not doing '%s' in image installation" % msg) return False + if flags.dirInstall: + log.info("Not doing '%s' in directory installation" % msg) + return False + if flags.testing: log.info("Not doing '%s', because we are just testing" % msg) return False diff --git a/pyanaconda/install.py b/pyanaconda/install.py index 9a55a9cfb..b1d3a1dd5 100644 --- a/pyanaconda/install.py +++ b/pyanaconda/install.py @@ -117,8 +117,9 @@ def doInstall(storage, payload, ksdata, instClass): # Do partitioning. payload.preStorage() - turnOnFilesystems(storage) - if not flags.flags.livecdInstall: + + turnOnFilesystems(storage, mountOnly=flags.flags.dirInstall) + if not flags.flags.livecdInstall and not flags.flags.dirInstall: storage.write() # Do packaging. @@ -137,7 +138,8 @@ def doInstall(storage, payload, ksdata, instClass): payload.postInstall() # Do bootloader. - with progress_report(_("Installing bootloader")): - writeBootLoader(storage, payload, instClass, ksdata) + if not flags.flags.dirInstall: + with progress_report(_("Installing bootloader")): + writeBootLoader(storage, payload, instClass, ksdata) progress.send_complete() diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py index a80ee0044..a3d31ff27 100644 --- a/pyanaconda/ui/gui/spokes/storage.py +++ b/pyanaconda/ui/gui/spokes/storage.py @@ -450,6 +450,10 @@ class StorageSpoke(NormalSpoke, StorageChecker): return self._ready @property + def showable(self): + return not flags.dirInstall + + @property def status(self): """ A short string describing the current status of storage setup. """ msg = _("No disks selected") diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py index 2cfff2735..80e309400 100644 --- a/pyanaconda/ui/tui/spokes/storage.py +++ b/pyanaconda/ui/tui/spokes/storage.py @@ -120,6 +120,10 @@ class StorageSpoke(NormalTUISpoke): return True @property + def showable(self): + return not flags.dirInstall + + @property def status(self): """ A short string describing the current status of storage setup. """ msg = _("No disks selected") |