summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--api.py2
-rw-r--r--bootconf.conf.example26
-rw-r--r--check.py6
-rwxr-xr-xcobbler (renamed from bootconf)41
-rw-r--r--cobbler.pod (renamed from bootconf.pod)0
-rw-r--r--config.py8
-rw-r--r--msg.py20
-rw-r--r--sync.py4
-rw-r--r--test.py2
-rw-r--r--util.py2
11 files changed, 43 insertions, 76 deletions
diff --git a/Makefile b/Makefile
index 47c9439..ad90129 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,10 @@
all: manpage
manpage:
- pod2man --center="bootconf" --release="" bootconf.pod > bootconf.1
- -(\rm bootconf.1.gz)
- gzip bootconf.1
- cp -f bootconf.1.gz /usr/share/man/man1
+ pod2man --center="cobbler" --release="" cobbler.pod > cobbler.1
+ -(\rm cobbler.1.gz)
+ gzip cobbler.1
+ cp -f cobbler.1.gz /usr/share/man/man1
install:
echo "(install not implemented)"
diff --git a/api.py b/api.py
index 4d3f21e..42887b1 100644
--- a/api.py
+++ b/api.py
@@ -335,7 +335,7 @@ class Distro(Item):
def set_kernel(self,kernel):
"""
Specifies a kernel. The kernel parameter is a full path, a filename
- in the configured kernel directory (set in /etc/bootconf.conf) or a
+ in the configured kernel directory (set in /etc/cobbler.conf) or a
directory path that would contain a selectable kernel. Kernel
naming conventions are checked, see docs in the utils module
for find_kernel.
diff --git a/bootconf.conf.example b/bootconf.conf.example
deleted file mode 100644
index 789817a..0000000
--- a/bootconf.conf.example
+++ /dev/null
@@ -1,26 +0,0 @@
----
-config:
- dhcpd_bin: /usr/sbin/dhcpd
- dhcpd_conf: /etc/dhcpd.conf
- kernel_root: /var/www/shoe
- kickstart_root: /var/www/shoe
- kickstart_url: 'http://192.168.1.1/kickstart'
- pxelinux: /usr/lib/syslinux/pxelinux.0
- servername: '192.168.1.1'
- tftpboot: /tftpboot
- tftpd_bin: /usr/sbin/in.tftpd
- tftpd_conf: /etc/xinetd.d/tftp
-distros:
- -
- initrd: 'initrd'
- kernel: 'vmlinuz'
- name: testdistro0
-groups:
- -
- distro: testdistro0
- kickstart: fc5.ks
- name: testgroup0
-systems:
- -
- group: testgroup0
- name: '00:90:27:F9:74:15'
diff --git a/check.py b/check.py
index efafb7c..d52386a 100644
--- a/check.py
+++ b/check.py
@@ -21,7 +21,7 @@ class BootCheck:
def run(self):
"""
Returns None if there are no errors, otherwise returns a list
- of things to correct prior to running bootconf 'for real'.
+ of things to correct prior to running $0 'for real'.
"""
status = []
self.check_dhcpd_bin(status)
@@ -56,7 +56,7 @@ class BootCheck:
def check_tftpd_dir(self,status):
"""
- Check if bootconf.conf's tftpboot directory exists
+ Check if cobbler.conf's tftpboot directory exists
"""
if not os.path.exists(self.config.tftpboot):
status.append(m("no_dir") % self.config.tftpboot)
@@ -64,7 +64,7 @@ class BootCheck:
def check_tftpd_conf(self,status):
"""
- Check that bootconf tftpd boot directory matches with tftpd directory
+ Check that configured tftpd boot directory matches with actual
Check that tftpd is enabled to autostart
"""
if os.path.exists(self.config.tftpd_conf):
diff --git a/bootconf b/cobbler
index e52e5ac..ab1c18c 100755
--- a/bootconf
+++ b/cobbler
@@ -55,7 +55,8 @@ class BootCLI:
'systems' : self.system,
'system' : self.system,
'sync' : self.sync,
- 'help' : self.help
+ '--help' : self.usage,
+ '/?' : self.usage
}
@@ -69,7 +70,7 @@ class BootCLI:
return rc
- def usage(self):
+ def usage(self,args):
"""
Print out abbreviated help if user gives bad syntax
"""
@@ -77,38 +78,30 @@ class BootCLI:
return False
- def help(self,args):
- """
- Print out tediously wrong help: 'bootconf help'
- """
- print m("help")
- return False
-
-
def system_list(self,args):
"""
- Print out the list of systems: 'bootconf system list'
+ Print out the list of systems: '$0 system list'
"""
print str(self.api.get_systems())
def profile_list(self,args):
"""
- Print out the list of profiles: 'bootconf profile list'
+ Print out the list of profiles: '$0 profile list'
"""
print str(self.api.get_profiles())
def distro_list(self,args):
"""
- Print out the list of distros: 'bootconf distro list'
+ Print out the list of distros: '$0 distro list'
"""
print str(self.api.get_distros())
def system_remove(self,args):
"""
- Delete a system: 'bootconf system remove --name=foo'
+ Delete a system: '$0 system remove --name=foo'
"""
commands = {
'--name' : lambda(a): self.api.get_systems().remove(a)
@@ -119,7 +112,7 @@ class BootCLI:
def profile_remove(self,args):
"""
- Delete a profile: 'bootconf profile remove --name=foo'
+ Delete a profile: '$0 profile remove --name=foo'
"""
commands = {
'--name' : lambda(a): self.api.get_profiles().remove(a)
@@ -130,7 +123,7 @@ class BootCLI:
def distro_remove(self,args):
"""
- Delete a distro: 'bootconf distro remove --name='foo'
+ Delete a distro: '$0 distro remove --name='foo'
"""
commands = {
'--name' : lambda(a): self.api.get_distros().remove(a)
@@ -141,7 +134,7 @@ class BootCLI:
def system_edit(self,args):
"""
- Create/Edit a system: 'bootconf system edit --name='foo' ...
+ Create/Edit a system: '$0 system edit --name='foo' ...
"""
sys = self.api.new_system()
commands = {
@@ -156,7 +149,7 @@ class BootCLI:
def profile_edit(self,args):
"""
- Create/Edit a profile: 'bootconf profile edit --name='foo' ...
+ Create/Edit a profile: '$0 profile edit --name='foo' ...
"""
profile = self.api.new_profile()
commands = {
@@ -177,7 +170,7 @@ class BootCLI:
def distro_edit(self,args):
"""
- Create/Edit a distro: 'bootconf distro edit --name='foo' ...
+ Create/Edit a distro: '$0 distro edit --name='foo' ...
"""
distro = self.api.new_distro()
commands = {
@@ -238,7 +231,7 @@ class BootCLI:
def sync(self, args):
"""
- Sync the config file with the system config: 'bootconf sync [--dryrun]'
+ Sync the config file with the system config: '$0 sync [--dryrun]'
"""
status = None
if args is not None and "--dryrun" in args:
@@ -250,7 +243,7 @@ class BootCLI:
def check(self,args):
"""
- Check system for network boot decency/prereqs: 'bootconf check'
+ Check system for network boot decency/prereqs: '$0 check'
"""
status = self.api.check()
if status is None:
@@ -267,21 +260,21 @@ class BootCLI:
def distro(self,args):
"""
- Handles any of the 'bootconf distro' subcommands
+ Handles any of the '$0 distro' subcommands
"""
return self.curry_args(args, self.commands['distro'])
def profile(self,args):
"""
- Handles any of the 'bootconf profile' subcommands
+ Handles any of the '$0 profile' subcommands
"""
return self.curry_args(args, self.commands['profile'])
def system(self,args):
"""
- Handles any of the 'bootconf system' subcommands
+ Handles any of the '$0 system' subcommands
"""
return self.curry_args(args, self.commands['system'])
diff --git a/bootconf.pod b/cobbler.pod
index 50fbe2d..50fbe2d 100644
--- a/bootconf.pod
+++ b/cobbler.pod
diff --git a/config.py b/config.py
index e142072..28bc221 100644
--- a/config.py
+++ b/config.py
@@ -24,8 +24,8 @@ class BootConfig:
"""
def __init__(self,api):
self.api = api
- self.settings_file = "/etc/bootconf.conf"
- self.state_file = "/var/bootconf/bootconf.conf"
+ self.settings_file = "/etc/cobbler.conf"
+ self.state_file = "/var/cobbler/cobbler.conf"
self.set_defaults()
self.clear()
@@ -98,7 +98,7 @@ class BootConfig:
print "WARNING: config file error: %s" % (self.settings_file)
self.set_defaults()
"""
- Convert all items bootconfig knows about to a nested hash.
+ Convert all items cobbler knows about to a nested hash.
There are seperate hashes for the /etc and /var portions.
"""
def to_hash(self,is_etc):
@@ -114,7 +114,7 @@ class BootConfig:
"""
- Convert a hash representation of a bootconfig to 'reality'
+ Convert a hash representation of a cobbler to 'reality'
There are seperate hashes for the /etc and /var portions.
"""
def from_hash(self,hash,is_etc):
diff --git a/msg.py b/msg.py
index b20dea4..1a27886 100644
--- a/msg.py
+++ b/msg.py
@@ -1,4 +1,4 @@
-# Messages used by bootconf.
+# Messages used by cobber.
# Michael DeHaan <mdehaan@redhat.com>
"""
@@ -7,19 +7,19 @@ be reused and potentially translated.
"""
msg_table = {
- "parse_error" : "could not parse /etc/bootconf.conf",
- "parse_error2" : "could not parse /var/bootconf/bootconf.conf",
+ "parse_error" : "could not parse /etc/cobber.conf",
+ "parse_error2" : "could not parse /var/cobbler/cobbler.conf",
"no_create" : "cannot create: %s",
"no_args" : "this command requires arguments.",
"missing_options" : "cannot add, all parameters have not been set",
- "unknown_cmd" : "bootconf doesn't understand '%s'",
+ "unknown_cmd" : "cobber doesn't understand '%s'",
"bad_arg" : "expecting an equal sign in argument '%s'",
"reject_arg" : "the value of parameter '%s' is not valid",
"weird_arg" : "this command doesn't take a parameter named '%s'",
"bad_sys_name" : "system name must be a MAC, IP, or resolveable host",
- "usage" : "for help, run 'bootconf help'",
+ "usage" : "for help, see 'man cobbler'",
"need_to_fix" : "the following potential problems were detected:",
- "need_root" : "bootconf must be run as root",
+ "need_root" : "cobber must be run as root",
"no_dhcpd" : "can't find dhcpd, try 'yum install dhcpd'",
"no_pxelinux" : "can't find pxelinux, try 'yum install pxelinux'",
"no_tftpd" : "can't find tftpd, try 'yum install tftpd'",
@@ -27,8 +27,8 @@ msg_table = {
"chg_attrib" : "need to change '%s' to '%s' in '%s'",
"no_exist" : "%s does not exist",
"no_line" : "file '%s' should have a line '%s' somewhere",
- "no_dir2" : "can't find %s for %s in bootconf.conf",
- "no_cfg" : "could not find bootconf.conf, recreating",
+ "no_dir2" : "can't find %s for %s in cobber.conf",
+ "no_cfg" : "could not find cobber.conf, recreating",
"bad_param" : "at least one parameter is missing for this function",
"empty_list" : "(Empty)",
"err_resolv" : "system (%s) did not resolve",
@@ -46,11 +46,11 @@ msg_table = {
"check_ok" : """
No setup problems found.
-Manual editing of /etc/dhcpd.conf and /etc/bootconf.conf is suggested to tailor them to your specific configuration. Your dhcpd.conf has some PXE related information in it, but it's imposible to tell automatically that it's totally correct in a general sense. We'll leave this up to you.
+Manual editing of /etc/dhcpd.conf and /etc/cobber.conf is suggested to tailor them to your specific configuration. Your dhcpd.conf has some PXE related information in it, but it's imposible to tell automatically that it's totally correct in a general sense. We'll leave this up to you.
Good luck.
""",
- "help" : "see 'man bootconf'"
+ "help" : "see 'man cobber'"
}
def m(key):
diff --git a/sync.py b/sync.py
index 664bbba..ac1187d 100644
--- a/sync.py
+++ b/sync.py
@@ -1,4 +1,4 @@
-# Code to vivify a bootconf configuration into a real TFTP/DHCP configuration.
+# Code to vivify a configuration into a real TFTP/DHCP configuration.
#
# Michael DeHaan <mdehaan@redhat.com>
@@ -28,7 +28,7 @@ class BootSync:
def sync(self,dry_run=False,verbose=True):
"""
- Syncs the current bootconf configuration.
+ Syncs the current configuration file with the config tree.
Using the Check().run_ functions previously is recommended
"""
self.dry_run = dry_run
diff --git a/test.py b/test.py
index df88770..84ecdcd 100644
--- a/test.py
+++ b/test.py
@@ -22,7 +22,7 @@ class BootTest(unittest.TestCase):
def setUp(self):
try:
# it will interfere with results...
- os.file.remove("/etc/bootconf.conf")
+ os.file.remove("/etc/cobbler.conf")
except:
pass
self.api = api.BootAPI()
diff --git a/util.py b/util.py
index 9b23ee9..3ff84c6 100644
--- a/util.py
+++ b/util.py
@@ -1,4 +1,4 @@
-# Misc heavy lifting functions for bootconf
+# Misc heavy lifting functions for cobbler
#
# Michael DeHaan <mdehaan@redhat.com>