Changeset 81


Ignore:
Timestamp:
Aug 16, 2007, 4:45:48 PM (17 years ago)
Author:
nelhage
Message:

A new version with less broken init scripts

Location:
trunk/packages/sipb-xen-database/sipb-xen-database
Files:
5 edited

Legend:

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

    r69 r81  
     1sipb-xen-database (2) unstable; urgency=low
     2
     3  * Fix the postinit and prerm scripts to create a sipb-xen user
     4
     5 -- Nelson Elhage <nelhage@mit.edu>  Thu, 16 Aug 2007 16:27:36 -0400
     6
    17sipb-xen-database (1) unstable; urgency=low
    28
  • trunk/packages/sipb-xen-database/sipb-xen-database/debian/control.in

    r69 r81  
    1515Package: sipb-xen-database-server
    1616Architecture: all
    17 Depends: ${misc:Depends}, postgresql-8.1, python-sqlalchemy, python-psycopg2, sipb-xen-database-common
     17Depends: ${misc:Depends}, ${python:Depends}, postgresql-8.1, python-sqlalchemy, python-psycopg2, sipb-xen-database-common
    1818Description: Installs the SIPB Xen database server
    1919 This tracks all the user VMs and is accessed from the VM host
  • trunk/packages/sipb-xen-database/sipb-xen-database/debian/sipb-xen-database-server.postinst

    r77 r81  
    2424        su postgres -c 'createuser sipb-xen -S -d -R'    || true
    2525        su postgres -c 'createdb sipb_xen -O sipb-xen'   || true
    26         PG_HBA=/etc/postgresql/8.1/main/pg_hba.conf
    27         perl -ni -e 'print unless /^# ===BEGIN ADDED BY sipb-xen-dabase server$/ ..
    28                                   /^# ===END ADDED BY sipb-xen-dabase server$/' \
    29                                   "$PG_HBA"
    30         cat<<EOF >> "$PG_HBA"
    31 # ===BEGIN ADDED BY sipb-xen-dabase server
    32 # DO NOT EDIT
    33 host    sipb_xen    sipb-xen    127.0.0.1/32          trust
    34 local   sipb_xen    sipb-xen                          trust
    35 # ===END ADDED BY sipb-xen-dabase server
    36 EOF
     26        adduser --system sipb-xen
    3727
    38         if hash invoke-rc.d; then
    39             invoke-rc.d postgresql-8.1 restart
    40         else
    41             /etc/init.d/postgresql-8.1 restart
    42         fi
    43 
    44         sipb-xen-database-tables create
     28        su sipb-xen -s /bin/sh -c 'sipb-xen-database-tables create'
    4529    ;;
    4630
  • trunk/packages/sipb-xen-database/sipb-xen-database/debian/sipb-xen-database-server.prerm

    r77 r81  
    2424        # su postgres -c 'dropdb sipb_xen'
    2525        # su postgres -c 'dropuser sipb-xen'
    26         PG_HBA=/etc/postgresql/8.1/main/pg_hba.conf
    27         perl -ni -e 'print unless /^# ===BEGIN ADDED BY sipb-xen-dabase server$/ ..
    28                                   /^# ===END ADDED BY sipb-xen-dabase server$/' \
    29                                   "$PG_HBA"
    30 
    31         if hash invoke-rc.d; then
    32             invoke-rc.d postgresql-8.1 restart
    33         else
    34             /etc/init.d/postgresql-8.1 restart
    35         fi
     26        deluser sipb-xen
    3627    ;;
    3728
  • trunk/packages/sipb-xen-database/sipb-xen-database/sipb-xen-database-tables

    r77 r81  
    1111    usage()
    1212
    13 connect('postgres://sipb-xen@localhost/sipb_xen')
     13connect('postgres://sipb-xen@/sipb_xen')
    1414
    1515if sys.argv[1] == "create":
Note: See TracChangeset for help on using the changeset viewer.