~ubuntu-branches/ubuntu/raring/maas/raring-proposed

« back to all changes in this revision

Viewing changes to src/maastesting/bindfixture.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2012-07-17 08:28:36 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20120717082836-ucb2vou8tqg353eq
Tags: 0.1+bzr777+dfsg-0ubuntu1
* New upstream release
* Only run 'maas' command as root. (LP: #974046)
  - debian/extras/maas: Check id.
  - debian/maas.install: Install in 'sbin'.
* debian/maas.postinst:
  - restart apache2 after everything gets processed.
  - Update version to handle upgrades.
* debian/extras/maas-provision: Add wrapper to access 'maasprovisiong'
  command line.
* debian/patches/99_temporary_fix_path.patch: Dropped. No longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
308
308
        '--rndc-port', type=int,
309
309
        help="The rndc port that will be used by BIND")
310
310
    parser.add_argument(
311
 
        '--overwrite_config', type=bool,
 
311
        '--overwrite-config', action='store_true',
312
312
        help="Whether or not to overwrite the configuration files "
313
313
             "if they already exist", default=False)
 
314
    parser.add_argument(
 
315
        '--create-config-only', action='store_true',
 
316
        help="If set, only create the config files instead of "
 
317
             "also running the service [default: %(default)s].",
 
318
        default=False)
314
319
    arguments = parser.parse_args()
315
320
 
316
321
    # Create homedir if it does not already exist.
324
329
        port=arguments.port, rndc_port=arguments.rndc_port)
325
330
    resources.setUp(overwrite_config=arguments.overwrite_config)
326
331
    # exec named.
327
 
    os.execlp(
328
 
        resources.named_file, resources.named_file, "-g", "-c",
329
 
        resources.conf_file)
 
332
    if not arguments.create_config_only:
 
333
        os.execlp(
 
334
            resources.named_file, resources.named_file, "-g", "-c",
 
335
            resources.conf_file)