[LON-CAPA-cvs] cvs: modules /sharrison/hosts_tab manage_hosts.pl
harris41
lon-capa-cvs@mail.lon-capa.org
Mon, 02 Sep 2002 15:57:02 -0000
harris41 Mon Sep 2 11:57:02 2002 EDT
Modified files:
/modules/sharrison/hosts_tab manage_hosts.pl
Log:
implementing handling of mbox format (for installrecord@install.lon-capa.org)
and adding in a little documentation
Index: modules/sharrison/hosts_tab/manage_hosts.pl
diff -u modules/sharrison/hosts_tab/manage_hosts.pl:1.2 modules/sharrison/hosts_tab/manage_hosts.pl:1.3
--- modules/sharrison/hosts_tab/manage_hosts.pl:1.2 Sun Aug 25 14:09:24 2002
+++ modules/sharrison/hosts_tab/manage_hosts.pl Mon Sep 2 11:57:02 2002
@@ -51,11 +51,11 @@
my %replace_entries;
my %insert_entries;
my $mode = 'production';
-if ($mode eq 'production')
+if ($mode eq 'production') # --------- Production cluster.
{
open(IN,'<production_hosts.tab');
}
-else
+else # -------- Development cluster.
{
open(IN,'<development_hosts.tab');
}
@@ -71,6 +71,10 @@
# ==================================== Output view and allow for text download.
+foreach my $entry (keys %entries)
+ {
+ print "$entry:$entries{$entry}\n";
+ }
# ======== If only a "user", then return, otherwise, go onto manager functions.
@@ -79,9 +83,14 @@
# ========== Scan in the e-mail and query the hosts.tab manager about response.
+# E-mail settings.
$ENV{'MAIL'} = 'installrecord';
+$ENV{'PROCESSEDMAIL'} = 'installrecord_processed';
+
# Open mailbox with read-write access.
my $folder = Mail::Box::Mbox->new(folder => $ENV{'MAIL'}, access => 'rw');
+my $folder = Mail::Box::Mbox->new(folder => $ENV{'PROCESSEDMAIL'},
+ access => 'rw');
foreach my $message ($folder->messages)
{
@@ -167,4 +176,8 @@
close(OUT);
+# ===================================================== SYNCHRONIZE EVERYTHING.
+
# === E-mail all LON-CAPA system administrators with the new updated hosts.tab.
+
+# ==================================================== CVS commit the new file.