summaryrefslogtreecommitdiffstats
path: root/cobbler/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/settings.py')
-rw-r--r--cobbler/settings.py44
1 files changed, 26 insertions, 18 deletions
diff --git a/cobbler/settings.py b/cobbler/settings.py
index 9e03666..276e1ed 100644
--- a/cobbler/settings.py
+++ b/cobbler/settings.py
@@ -17,6 +17,27 @@ import utils
TESTMODE = False
+DEFAULTS = {
+ "httpd_bin" : "/usr/sbin/httpd",
+ "dhcpd_conf" : "/etc/dhcpd.conf",
+ "tftpd_bin" : "/usr/sbin/in.tftpd",
+ "server" : "127.0.0.1",
+ "next_server" : "127.0.0.1",
+ "dhcpd_bin" : "/usr/sbin/dhcpd",
+ "kernel_options" : "append devfs=nomount ramdisk_size=16438 lang= vga=788 ksdevice=eth0",
+ "tftpd_conf" : "/etc/xinetd.d/tftp",
+ "tftpboot" : "/tftpboot",
+ "webdir" : "/var/www/cobbler",
+ "default_kickstart" : "/etc/cobbler/default.ks",
+ "manage_dhcp" : 0,
+ "koan_path" : "",
+ "bootloaders" : {
+ "standard" : "/usr/lib/syslinux/pxelinux.0",
+ "ia64" : "/var/lib/cobbler/elilo-3.6-ia64.efi"
+ }
+}
+
+
class Settings(serializable.Serializable):
def filename(self):
@@ -38,24 +59,7 @@ class Settings(serializable.Serializable):
"""
Reset this object to reasonable default values.
"""
- self._attributes = {
- "httpd_bin" : "/usr/sbin/httpd",
- "dhcpd_conf" : "/etc/dhcpd.conf",
- "tftpd_bin" : "/usr/sbin/in.tftpd",
- "server" : "127.0.0.1",
- "next_server" : "127.0.0.1",
- "dhcpd_bin" : "/usr/sbin/dhcpd",
- "kernel_options" : "append devfs=nomount ramdisk_size=16438 lang= vga=788 ksdevice=eth0",
- "tftpd_conf" : "/etc/xinetd.d/tftp",
- "tftpboot" : "/tftpboot",
- "webdir" : "/var/www/cobbler",
- "manage_dhcp" : 0,
- "koan_path" : "",
- "bootloaders" : {
- "standard" : "/usr/lib/syslinux/pxelinux.0",
- "ia64" : "/var/lib/cobbler/elilo-3.6-ia64.efi"
- }
- }
+ self._attributes = DEFAULTS
def printable(self):
buf = ""
@@ -82,6 +86,10 @@ class Settings(serializable.Serializable):
def __getattr__(self,name):
if self._attributes.has_key(name):
return self._attributes[name]
+ elif DEFAULTS.has_key(name):
+ lookup = DEFAULTS[name]
+ self._attributes[name] = lookup
+ return lookup
else:
raise AttributeError, name