diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-03-10 19:39:04 +0100 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-03-10 19:39:04 +0100 |
commit | 5a217159261f0831c1243e6172eaffdc2dd9e501 (patch) | |
tree | 7f2d556b03261033a5778d305ade8c5746c7c8ff | |
parent | 837b3e9ad3095e0ea9b81c16a33ef4ee15828e59 (diff) | |
download | firstaidkit-5a217159261f0831c1243e6172eaffdc2dd9e501.tar.gz firstaidkit-5a217159261f0831c1243e6172eaffdc2dd9e501.tar.xz firstaidkit-5a217159261f0831c1243e6172eaffdc2dd9e501.zip |
Be more intelligent about configuring the root for the plugin system.
-rw-r--r-- | pyfirstaidkit/configuration.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pyfirstaidkit/configuration.py b/pyfirstaidkit/configuration.py index 89339e8..0ed741a 100644 --- a/pyfirstaidkit/configuration.py +++ b/pyfirstaidkit/configuration.py @@ -28,7 +28,6 @@ else: def createDefaultConfig(config): """Create the default config with the object.""" - config.system.root = "/mnt/sysimage" config.operation.flags = "" config.operation.mode = "auto" config.operation.params = "" @@ -39,6 +38,12 @@ def createDefaultConfig(config): config.log.filename = "/var/log/firstaidkit.log" config.plugin.disabled = "" + # Setup a sane default root directory. + if os.path.isdir("/mnt/sysimage"): + config.system.root = "/mnt/sysimage" + else + config.system.root = "/" + # # There will be 4 default places where FAK will look for plugins, these 4 names # will be reserved in the configuration. lib{,64}-firstaidkit-{,examples} |