From 5a217159261f0831c1243e6172eaffdc2dd9e501 Mon Sep 17 00:00:00 2001 From: Joel Andres Granados Date: Mon, 10 Mar 2008 19:39:04 +0100 Subject: Be more intelligent about configuring the root for the plugin system. --- pyfirstaidkit/configuration.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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} -- cgit