From: zacheiss Date: Tue, 3 May 2005 22:35:42 +0000 (+0000) Subject: Remove stellar DCM and add confluence DCM, which is mostly the stellar X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/894e7731be411be54794f3e4d7648bf72607c794 Remove stellar DCM and add confluence DCM, which is mostly the stellar DCM with the serial numbers filed off. Update Makefile.in to install correct things. --- diff --git a/gen/Makefile.in b/gen/Makefile.in index 0f3117cb..6b90a16f 100644 --- a/gen/Makefile.in +++ b/gen/Makefile.in @@ -43,11 +43,11 @@ TARGET= acl.gen boot.gen dhcp.gen directory.gen hesiod.gen hosts.gen \ postoffice.gen print.gen warehouse.gen winad.gen www.gen zephyr.gen SCRIPTS=access.gen access.sh acl.sh aliases.sh boot.sh ca.gen calendar.gen \ - dhcp.sh events.gen events.sh hesiod.sh ip-billing.gen ip-billing.sh \ - ldap.gen longjobs.gen longjobs.sh mailhub.sh mailman.gen mailman.sh \ - ndb.sh nfs.sh null.sh postoffice.sh print.sh sapprint.gen sapprint.sh \ - spwatch.gen stellar.gen stellar.sh warehouse.sh winstats.gen \ - winstats.sh www.sh zephyr.sh install_dirs install_quotas zero_quotas + confluence.gen dhcp.sh events.gen events.sh hesiod.sh ip-billing.gen \ + ip-billing.sh ldap.gen longjobs.gen longjobs.sh mailhub.sh mailman.gen \ + mailman.sh ndb.sh nfs.sh null.sh postoffice.sh print.sh sapprint.gen \ + sapprint.sh spwatch.gen warehouse.sh winstats.gen winstats.sh www.sh zephyr.sh \ + install_dirs install_quotas zero_quotas .SUFFIXES: .pc .gen diff --git a/gen/stellar.gen b/gen/confluence.gen similarity index 89% rename from gen/stellar.gen rename to gen/confluence.gen index 072def8b..b39011a4 100755 --- a/gen/stellar.gen +++ b/gen/confluence.gen @@ -5,12 +5,10 @@ # The following exit codes are defined and MUST BE CONSISTENT with the # error codes the library uses: $MR_DBMS_ERR = 47836421; -$MR_OCONFIG = 47836460; $ENV{PATH} = "/bin:/usr/bin:/sbin:/usr/sbin"; -$outdir = '/moira/dcm/stellar'; -$outfile = '/moira/dcm/stellar.out'; +$outdir = '/moira/dcm/confluence'; umask 022; use DBI; @@ -20,7 +18,7 @@ $dbh = DBI->connect("dbi:Oracle:moira", "moira", "moira") $sth0 = $dbh->prepare("SELECT l.list_id, m.name " . "FROM list l, machine m, serverhosts sh " . - "WHERE sh.value3 = l.name AND sh.service = 'STELLAR' " . + "WHERE sh.value3 = l.name AND sh.service = 'CONFLUENCE' " . "AND m.mach_id = sh.mach_id") || exit $MR_DBMS_ERR; $sth0->execute; @@ -77,8 +75,6 @@ while (($root_list_id, $hostname) = $sth0->fetchrow_array) { close(OUT); } -system("cd $outdir && tar cf $outfile .") == 0 || exit $MR_OCONFIG; - $dbh->disconnect; exit 0; diff --git a/gen/stellar.sh b/gen/stellar.sh deleted file mode 100644 index 0d5a33f9..00000000 --- a/gen/stellar.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# $Header$ - -PATH=/usr/bin:/bin:/usr/sbin:/sbin - -if [ -d /var/athena ] && [ -w /var/athena ]; then - exec >/var/athena/moira_update.log 2>&1 -else - exec >/tmp/moira_update.log 2>&1 -fi - -# The following exit codes are defined and MUST BE CONSISTENT with the -# error codes the library uses: -MR_MISSINGFILE=47836473 -MR_MKCRED=47836474 -MR_TARERR=47836476 - -TARFILE=/var/tmp/stellar.out -SRCDIR=/var/tmp/stellar.dir - -uchost=`hostname | tr '[a-z]' '[A-Z]'` -echo $uchost | egrep -e "\." >/dev/null -if [ $? != 0 ]; then - uchost=$uchost.MIT.EDU -fi - -# Alert if the tar file does not exist -test -r $TARFILE || exit $MR_MISSINGFILE - -# Make a temporary directory to unpack the tar file into -rm -rf $SRCDIR -mkdir $SRCDIR || exit $MR_MKCRED -cd $SRCDIR || exit $MR_MKCRED - -# Extract everything -tar xpf $TARFILE || exit $MR_TARERR - -if [ -f "$uchost" ]; then - /var/local/stellar-support/moira-to-stellar.perl -else - exit $MR_MISSINGFILE -fi - -# cleanup -cd / -rm -rf $SRCDIR -test -f $TARFILE && rm -f $TARFILE -test -f $0 && rm -f $0 - -exit 0