Ignore:
Timestamp:
Aug 3, 2008, 1:22:48 AM (16 years ago)
Author:
y_z
Message:
  • added decomposition of DB URI
  • generate nss-pgsql.conf from debian init script
Location:
trunk/packages/sipb-xen-console/debian
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-console/debian/changelog

    r800 r843  
     1sipb-xen-console (7.7) unstable; urgency=low
     2
     3  * sipb_xen_database -> invirt.database
     4  * use invirt config in sipb-xen-consolefs
     5  * added decomposition of DB URI
     6  * generate nss-pgsql.conf from debian init script
     7
     8 -- Yang Zhang <y_z@mit.edu>  Sun,  3 Aug 2008 01:13:37 -0400
     9
    110sipb-xen-console (7.6) unstable; urgency=low
    211
  • trunk/packages/sipb-xen-console/debian/sipb-xen-console.init

    r800 r843  
    1 #! /bin/sh
     1#!/bin/bash
    22### BEGIN INIT INFO
    33# Provides:          sipb-xen-console
     
    3838gen_config()
    3939{
    40         (for i in $(invirt-getconf --ls hosts); do
    41                 hostname=$(invirt-getconf hosts.$i.hostname)
    42                 echo "#include /etc/conserver/conf.d/$hostname"
    43         done) >/etc/conserver/invirt-hosts.cf
    44         realm=$(invirt-getconf authn.0.realm)
    45         (for i in $(invirt-getconf --ls hosts); do
    46                 hostname=$(invirt-getconf hosts.$i.hostname)
    47                 echo "host/$hostname@$realm"
    48         done) >/etc/remctl/acl/invirt-console
     40    {
     41        for i in $(invirt-getconf --ls hosts); do
     42            local hostname=$(invirt-getconf hosts.$i.hostname)
     43            echo "#include /etc/conserver/conf.d/$hostname"
     44        done
     45    } > /etc/conserver/invirt-hosts.cf
     46    local realm=$(invirt-getconf authn.0.realm)
     47    {
     48        for i in $(invirt-getconf --ls hosts); do
     49            local hostname=$(invirt-getconf hosts.$i.hostname)
     50            echo "host/$hostname@$realm"
     51        done
     52    } > /etc/remctl/acl/invirt-console
     53
     54    cat > /etc/nss-pgsql.conf << EOF
     55host            = $(invirt-getconf db.host)
     56port            = $(invirt-getconf db.port)
     57database        = $(invirt-getconf db.dbname)
     58login           = $(invirt-getconf db.user)
     59
     60querypasswd = SELECT name, NULL, machine_id + 1000 as uid, machine_id + 1000 as gid, '', '/consolefs/'|| name, '/usr/bin/sipb-xen-consolesh' FROM machines
     61querygroup = SELECT name, NULL, machine_id + 1000 as gid FROM machines
     62querymembers = SELECT name FROM machines WHERE 1000 + machine_id = %d
     63queryids = SELECT 1000 + machine_id AS gid FROM machines LIMIT 0
     64
     65passwd_name = name
     66passwd_uid = 1000 + machine_id
     67
     68group_name = name
     69group_gid = 1000 + machine_id
     70EOF
    4971}
    5072
Note: See TracChangeset for help on using the changeset viewer.