Changeset 126


Ignore:
Timestamp:
Oct 7, 2007, 6:32:15 PM (17 years ago)
Author:
tabbott
Message:

fixed to work with web interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/files/usr/sbin/remctl-update.sh

    r121 r126  
    1313update_machine()
    1414{
    15     machine=$1
     15    machine="$1"
    1616    sed "s/#MACHINENAME#/$machine/g" "$TEMPLATE" | \
    1717        sed "s,#BINDIR#,$BINDIR,g" >| "$MACHINETMP"
     
    2525update_moiragroup()
    2626{
    27     group=$1
     27    group="$1"
    2828    # Should perhaps replace with LDAP, but fine for now.
    2929
     
    3131    # all bits and delete the moira-acl files whenever there's an AFS
    3232    # outage.
    33     pts membership -nameorid "system:$group" -noauth | tail -n+2 | \
    34         sed 's/\./\//; s/^  //; s/$/@ATHENA.MIT.EDU/g' >| "$MOIRATMP"
     33    pts membership system:"$group" -noauth | tail -n+2 | \
     34        sed 's/\./\//' | \
     35        sed 's/^  //' | \
     36        sed 's/$/@ATHENA.MIT.EDU/g' >| "$MOIRATMP"
    3537    if test -s "$MOIRATMP"; then
    3638        if ! cmp -s "$MOIRADIR/$group" "$MOIRATMP"; then
     
    7375        grep -R moira "$ACLDIR/" /etc/remctl/acl/ | perl -pe 's/.*moira-acl\/(.*)/$1/g' >| "$AUTOMOIRALIST"
    7476        ;;
     77    register)
     78        if [ "$2" == "Domain-0" ]; then
     79            echo "No, you can't control Domain 0"
     80            exit 1
     81        fi
     82        if [ -e /etc/xen/"$2" ]; then
     83            echo "Machine already exists outside database"
     84            exit 1
     85        fi
     86        if [ -e "$ACLDIR"/"$2" ]; then
     87            echo "Machine already registered"
     88            exit 1
     89        fi
     90        echo "include /etc/remctl/acl/web" > "$ACLDIR/$2"
     91        "$0" web
     92        ;;
     93    web)
     94        "$0" auto_machine_list
     95        "$0" all_machines
     96        ;;     
    7597    all)
    7698        "$0" auto_machine_list
Note: See TracChangeset for help on using the changeset viewer.