Commit da92c704 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Added help for slapbuilder

Link to SlapOS tutorial
parent 303ee9b9
...@@ -2,3 +2,8 @@ builder ...@@ -2,3 +2,8 @@ builder
======= =======
builder is a program to install a slapos image. builder is a program to install a slapos image.
To learn more about installing an image on a hard drive or USB key:
http://www.slapos.org/wiki/osoe-Lecture.SlapOS.Extended/developer-Installing.SlapOS.Slave.Node.USB
To learn more about installing an image on a Virtual Machine Player:
http://www.slapos.org/wiki/osoe-Lecture.SlapOS.Extended/developer-Installing.SlapOS.Slave.Node.VM
...@@ -81,7 +81,10 @@ class Parser(OptionParser): ...@@ -81,7 +81,10 @@ class Parser(OptionParser):
""" """
Initialize all options possibles. Initialize all options possibles.
""" """
OptionParser.__init__(self, usage=usage, version=version, desc = """This command allow you to personalize a SlapOS Image. You can use it to put your image on a USB key, a Hard Drive, or you can use it with a virtual machine image. More information on:
http://www.slapos.org/wiki/osoe-Lecture.SlapOS.Extended """
OptionParser.__init__(self, usage=usage, version=version, description=desc,
option_list=[ option_list=[
Option("-c", "--slapos_configuration", Option("-c", "--slapos_configuration",
help="The path of the slapos configuration directory", help="The path of the slapos configuration directory",
...@@ -111,6 +114,8 @@ class Parser(OptionParser): ...@@ -111,6 +114,8 @@ class Parser(OptionParser):
""" """
Check arguments Check arguments
""" """
(options, args) = self.parse_args() (options, args) = self.parse_args()
if len(args) != 8: if len(args) != 8:
self.error("Incorrect number of arguments") self.error("Incorrect number of arguments")
...@@ -366,12 +371,12 @@ def main(): ...@@ -366,12 +371,12 @@ def main():
usage = "usage: %s [options] SYSTEM_FILE OUTPUT_DEVICE " \ usage = "usage: %s [options] SYSTEM_FILE OUTPUT_DEVICE " \
"COMPUTER_ID SSH_KEY_FILE MASTER_URL SLAPOS_SOFTWARE_PROFILE_URL "\ "COMPUTER_ID SSH_KEY_FILE MASTER_URL SLAPOS_SOFTWARE_PROFILE_URL "\
"COMPUTER_CERTIFICATE COMPUTER_KEY" % sys.argv[0] "COMPUTER_CERTIFICATE COMPUTER_KEY" % sys.argv[0]
try: try:
# Parse arguments # Parse arguments
config = Config() config = Config()
config.setConfig(*Parser(usage=usage).check_args()) config.setConfig(*Parser(usage=usage).check_args())
run(config) run(config)
return_code = 0 return_code = 0
except UsageError, err: except UsageError, err:
...@@ -386,3 +391,4 @@ def main(): ...@@ -386,3 +391,4 @@ def main():
return_code = err return_code = err
sys.exit(return_code) sys.exit(return_code)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment