Ignore:
Timestamp:
Aug 3, 2008, 12:46:09 AM (16 years ago)
Author:
y_z
Message:

use invirt config in sipb-xen-lvm and to generate /etc/remctl/acl/remote

Location:
trunk/packages/sipb-xen-remctl-auto
Files:
2 deleted
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-remctl-auto/debian/sipb-xen-remctl-auto.init

    r831 r834  
    1 #! /bin/sh
     1#! /bin/bash
    22### BEGIN INIT INFO
    3 # Provides:          sipb-xen-console-server
     3# Provides:          sipb-xen-remctl-auto
    44# Required-Start:    $local_fs $remote_fs
    55# Required-Stop:     $local_fs $remote_fs
     
    1717PATH=/sbin:/usr/sbin:/bin:/usr/bin
    1818DESC="Invirt host console config"
    19 NAME=sipb-xen-console-server
     19NAME=sipb-xen-remctl-auto
    2020SCRIPTNAME=/etc/init.d/$NAME
    2121
     
    3232gen_config()
    3333{
    34         console_ip=$(invirt-getconf console.ip)
    35         cat >/etc/conserver/invirt-genconfig.cf <<EOF
    36 access * {
    37        trusted 127.0.0.1;
    38        trusted $console_ip;
    39        limited *;
    40 }
    41 EOF
     34    echo "host/$(invirt-getconf remote.hostname)@$(invirt-getconf authn.0.realm)" \
     35        > /etc/remctl/acl/remote
    4236}
    4337
     
    5246        #   2 if daemon could not be started
    5347        gen_config
    54         VERBOSE=no /etc/init.d/conserver-server reload
    5548}
    5649
     
    6053do_stop()
    6154{
    62         return 1
     55        return 0
    6356}
    6457
     
    6659{
    6760        gen_config
    68         VERBOSE=no /etc/init.d/conserver-server reload
    6961}
    7062
  • trunk/packages/sipb-xen-remctl-auto/files/usr/sbin/sipb-xen-lvm

    r175 r834  
    44import os.path
    55from subprocess import call, PIPE, Popen
     6from invirt.config import structs as config
    67
    78def check(b):
     
    2223    from sipb_xen_database import *
    2324    import re
    24     connect('postgres://sipb-xen@sipb-xen-dev.mit.edu/sipb_xen')
     25    connect(config.db.uri)
    2526    for d in Disk.select():
    2627        check(re.match('^[A-Za-z0-9]+$', d.guest_device_name))
Note: See TracChangeset for help on using the changeset viewer.