Changeset 63
- Timestamp:
- Aug 5, 2007, 10:11:50 PM (17 years ago)
- svk:copy_cache_prev:
- 62
- Location:
- trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/debian/changelog
r32 r63 1 sipb-xen-remctl-auto (1.0.1) unstable; urgency=low 2 3 * Stop scaring me with unquoted variables. 4 5 -- Anders Kaseorg <andersk@mit.edu> Sun, 05 Aug 2007 22:11:02 -0400 6 1 7 sipb-xen-remctl-auto (1.0) unstable; urgency=low 2 8 -
trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/files/etc/remctl/sipb-xen-auto/bin/dispatch.sh
r32 r63 10 10 # need them for this script. 11 11 12 ACTION=$(echo $0| awk -F'.' '{print $2}')12 ACTION=$(echo "$0" | awk -F'.' '{print $2}') 13 13 MACHINE=$1 14 echo $ACTION14 echo "$ACTION" 15 15 16 16 case "$ACTION" in 17 17 reboot|list|vcpu-list|destroy|create|uptime) 18 xm $ACTION $MACHINE18 xm "$ACTION" "$MACHINE" 19 19 exit 0 20 20 ;; -
trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/files/etc/remctl/sipb-xen-auto/remctl-update.sh
r32 r63 14 14 { 15 15 machine=$1 16 sed "s/#MACHINENAME#/$machine/g" $TEMPLATE| \17 sed "s,#BINDIR#,$BINDIR,g" >| $MACHINETMP18 if ! cmp -s $MACHINEDIR/$machine $MACHINETMP; then19 mv $MACHINETMP $MACHINEDIR/$machine16 sed "s/#MACHINENAME#/$machine/g" "$TEMPLATE" | \ 17 sed "s,#BINDIR#,$BINDIR,g" >| "$MACHINETMP" 18 if ! cmp -s "$MACHINEDIR/$machine" "$MACHINETMP"; then 19 mv "$MACHINETMP" "$MACHINEDIR/$machine" 20 20 else 21 rm -f $MACHINETMP21 rm -f "$MACHINETMP" 22 22 fi 23 23 } … … 31 31 # all bits and delete the moira-acl files whenever there's an AFS 32 32 # outage. 33 pts membership system:$group -noauth | tail -n+2 | \ 34 sed 's/\./\//' | \ 35 sed 's/^ //' | \ 36 sed 's/$/@ATHENA.MIT.EDU/g' >| $MOIRATMP 37 if test -s $MOIRATMP; then 38 if ! cmp -s $MOIRADIR/$group $MOIRATMP; then 39 mv $MOIRATMP $MOIRADIR/$group 33 pts membership -nameorid "system:$group" -noauth | tail -n+2 | \ 34 sed 's/\./\//; s/^ //; s/$/@ATHENA.MIT.EDU/g' >| "$MOIRATMP" 35 if test -s "$MOIRATMP"; then 36 if ! cmp -s "$MOIRADIR/$group" "$MOIRATMP"; then 37 mv "$MOIRATMP" "$MOIRADIR/$group" 40 38 fi 41 39 else 42 if test -e $MOIRADIR/$group; then43 rm $MOIRADIR/$group40 if test -e "$MOIRADIR/$group"; then 41 rm "$MOIRADIR/$group" 44 42 fi 45 43 fi 46 rm -f $MOIRATMP44 rm -f "$MOIRATMP" 47 45 } 48 46 … … 54 52 all_machines) 55 53 # update the remctl.conf definitions 56 for machine in `cat $AUTOMACHINELIST`; do57 update_machine $machine54 for machine in `cat "$AUTOMACHINELIST"`; do 55 update_machine "$machine" 58 56 done 59 57 ;; 60 58 all_moira) 61 59 # update our moira ACL lists 62 for group in `cat $AUTOMOIRALIST`; do63 update_moiragroup $group60 for group in `cat "$AUTOMOIRALIST"`; do 61 update_moiragroup "$group" 64 62 done 65 63 ;; 66 64 auto_machine_list) 67 65 # update the list of maintained machines 68 /bin/ls $ACLDIR >| $AUTOMACHINELIST66 /bin/ls "$ACLDIR" >| "$AUTOMACHINELIST" 69 67 ;; 70 68 auto_moira_list) 71 69 # update the moira list-of-lists 72 # /bin/ls $MOIRADIR >| $AUTOMOIRALIST# BAD IDEA in case of outage70 # /bin/ls "$MOIRADIR" >| "$AUTOMOIRALIST" # BAD IDEA in case of outage 73 71 74 72 # This extracts the list of all moira lists we care about, and updates those. 75 grep -R moira $ACLDIR/ /etc/remctl/acl/ | perl -pe 's/.*moira-acl\/(.*)/$1/g' >| $AUTOMOIRALIST73 grep -R moira "$ACLDIR/" /etc/remctl/acl/ | perl -pe 's/.*moira-acl\/(.*)/$1/g' >| "$AUTOMOIRALIST" 76 74 ;; 77 75 all)
Note: See TracChangeset
for help on using the changeset viewer.