load system config file; document config options
authorChristian Weiske <cweiske@cweiske.de>
Tue, 28 Dec 2010 21:59:02 +0000 (22:59 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 28 Dec 2010 21:59:02 +0000 (22:59 +0100)
README
Wrt3g/Config.php

diff --git a/README b/README
index 741ddc1a199f9dba5669834758dbd72966ac65c7..7475c5873386f46b23db1e456cfc05a5a842fd49 100644 (file)
--- a/README
+++ b/README
@@ -11,6 +11,24 @@ The routers are also known under the names:
 - WRT54G3G
 
 
+Configuration
+-------------
+The tools can be configured in three ways:
+1. Commandline options
+   Use --help to get an overview
+
+2. User configuration file
+   ~/.config/linksys-wrt3g-tools
+
+3. System configuration file
+   /etc/linksys-wrt3g-tools
+
+The configuration files are normal ini-style files with key=value
+lines. Supported configuration options in the files are
+ - host
+ - user
+ - password
+
 
 Dependencies
 ------------
index f8b96492fe8620583c1ddd6a312d18256ceb949d..a8232df490456365706881d0d45757a67eb9dbec 100644 (file)
@@ -80,12 +80,17 @@ class Wrt3g_Config
      */
     public function load($options = array())
     {
+        //system config file
+        $this->loadFromFile('/etc/linksys-wrt3g-tools');
+
+        //user config file
         $file = $this->getConfigFilePath();
         if ($file) {
             $this->loadFromFile($file);
         }
         $this->loadOptions($options);
 
+        //commandline options
         if (isset($options['save'])) {
             $this->save($file);
         }