more config and web page stuff
[CBFWR.git] / libcbfwr / config.php
index 9ca0ff9..7bffc1d 100644 (file)
@@ -31,7 +31,7 @@ class Config {
                                        $this->config_file = "../var/";
                                } else {
                                        echo "No directory where i can create a config, bailing\n";
-                                       $this->config["status"] = "unconf";
+                                       $this->config["status"] = "nodir";
                                }
                        }
                        
@@ -93,6 +93,7 @@ class Config {
                                        }
                                        fclose($fp);
                                }
+                               if(file_exists("/sys/class/net/$fname/address")) $this->config["hardware"]["netdev"][$fname]["hwaddress"] = file_get_contents("/sys/class/net/$fname/address");
                                if(file_exists("/sys/class/net/$fname/bonding")) $this->config["hardware"]["netdev"][$fname]["bonding"] = true;
                                if(file_exists("/sys/class/net/$fname/bridge")) $this->config["hardware"]["netdev"][$fname]["bridge"] = true;
                        }