~ahasenack/landscape-client/landscape-client-11.07.1.1-0ubuntu0.11.10.0

« back to all changes in this revision

Viewing changes to landscape/configuration.py

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Hasenack
  • Date: 2010-09-08 15:34:09 UTC
  • mto: This revision was merged to the branch mainline in revision 32.
  • Revision ID: james.westby@ubuntu.com-20100908153409-cuhirosnil6hk1f9
Tags: upstream-1.5.5
ImportĀ upstreamĀ versionĀ 1.5.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
607
607
 
608
608
 
609
609
def main(args):
 
610
    config = LandscapeSetupConfiguration(fetch_import_url)
 
611
    if args in (["-h"], ["--help"]):
 
612
        # We let landscape-config --help to be run as normal user
 
613
        config.load(args)
 
614
 
610
615
    if os.getuid() != 0:
611
616
        sys.exit("landscape-config must be run as root.")
612
617
 
613
 
    config = LandscapeSetupConfiguration(fetch_import_url)
614
618
    try:
615
619
        config.load(args)
616
620
    except ImportOptionError, error:
617
621
        print_text(str(error), error=True)
618
622
        sys.exit(1)
619
623
 
 
624
 
620
625
    # Disable startup on boot and stop the client, if one is running.
621
626
    if config.disable:
622
627
        stop_client_and_disable_init_script()