version 1.5, 2002/05/13 01:09:26
|
version 1.6, 2002/05/13 02:24:44
|
Line 311 my %perlvar;
|
Line 311 my %perlvar;
|
} |
} |
close(CONFIG); |
close(CONFIG); |
} |
} |
|
# implement editing logic below, interactively |
|
# update loncapa.conf until 7 is entered |
|
|
|
$flag=0; |
|
while (!$flag) { |
print(<<END); |
print(<<END); |
|
|
=============================================================================== |
=============================================================================== |
Line 322 This is now the current configuration of
|
Line 327 This is now the current configuration of
|
5) Cache Expiration Time: $perlvar{'lonExpire'} |
5) Cache Expiration Time: $perlvar{'lonExpire'} |
6) Server Load: $perlvar{'lonLoadLim'} |
6) Server Load: $perlvar{'lonLoadLim'} |
7) Everything is correct up above |
7) Everything is correct up above |
|
END |
|
print(<<END); |
ENTER A CHOICE OF 1-6 TO CHANGE, otherwise ENTER 7: |
ENTER A CHOICE OF 1-6 TO CHANGE, otherwise ENTER 7: |
END |
END |
|
|
# implement editing logic below, interactively |
|
# update loncapa.conf until 7 is entered |
|
my $choice=<>; |
my $choice=<>; |
chomp($choice); |
chomp($choice); |
|
if ($choice==1) { |
|
print(<<END); |
|
1) Machine Name: $perlvar{'lonHostID'} |
|
ENTER NEW VALUE: |
|
END |
|
my $choice2=<>; |
|
chomp($choice2); |
|
$perlvar{'lonHostID'}=$choice2; |
|
} |
|
elsif ($choice==2) { |
|
print(<<END); |
|
2) Domain Name: $perlvar{'lonDefDomain'} |
|
ENTER NEW VALUE: |
|
END |
|
my $choice2=<>; |
|
chomp($choice2); |
|
$perlvar{'lonDefDomain'}=$choice2; |
|
} |
|
elsif ($choice==3) { |
|
print(<<END); |
|
3) System Administrator's E-mail Address: $perlvar{'lonAdmEmail'} |
|
ENTER NEW VALUE: |
|
END |
|
my $choice2=<>; |
|
chomp($choice2); |
|
$perlvar{'lonAdmEmail'}=$choice2; |
|
} |
|
elsif ($choice==4) { |
|
print(<<END); |
|
4) Role: $perlvar{'lonRole'} |
|
ENTER NEW VALUE: |
|
END |
|
my $choice2=<>; |
|
chomp($choice2); |
|
$perlvar{'lonRole'}=$choice2; |
|
} |
|
elsif ($choice==5) { |
|
print(<<END); |
|
5) Cache Expiration Time: $perlvar{'lonExpire'} |
|
ENTER NEW VALUE: |
|
END |
|
my $choice2=<>; |
|
chomp($choice2); |
|
$perlvar{'lonExpire'}=$choice2; |
|
} |
|
elsif ($choice==6) { |
|
print(<<END); |
|
6) Server Load: $perlvar{'lonLoadLim'} |
|
ENTER NEW VALUE: |
|
END |
|
my $choice2=<>; |
|
chomp($choice2); |
|
$perlvar{'lonLoadLim'}=$choice2; |
|
} |
|
elsif ($choice==7) { |
|
$flag=1; |
|
} |
|
else { |
|
|
|
} |
|
} |
</perlscript> |
</perlscript> |
</file> |
</file> |
<file> |
<file> |
Line 349 on the LON-CAPA network)
|
Line 413 on the LON-CAPA network)
|
2) STAND-ALONE - you want this machine to run in 'stand-alone' mode and |
2) STAND-ALONE - you want this machine to run in 'stand-alone' mode and |
not be connected to other LON-CAPA machines for now |
not be connected to other LON-CAPA machines for now |
3) DEVELOPMENT - you want to play with or explore LON-CAPA |
3) DEVELOPMENT - you want to play with or explore LON-CAPA |
4) Do not install hosts.tab right now |
4) PRESERVE the existing hosts.tab (/home/httpd/lonTabs/hosts.tab) |
|
|
ENTER 1, 2, 3, or 4: |
|
END |
END |
# Option number 26 will install rawhide_hosts.tab, but |
# Option number 26 will install rawhide_hosts.tab, but |
# the typical user does not want to be part of an intensive |
# the typical user does not want to be part of an intensive |
Line 359 END
|
Line 422 END
|
|
|
# get input |
# get input |
# if valid then process, otherwise loop |
# if valid then process, otherwise loop |
my $choice=<>; |
my $hostname=`hostname`;chomp($hostname); |
chomp($choice); |
my $hostaddress=`hostname -i $hostname`;chomp($hostaddress); |
|
$flag=0; |
|
while (!$flag) { |
|
print "ENTER 1, 2, 3, or 4:\n"; |
|
my $choice=<>; |
|
chomp($choice); |
|
if ($choice==1) { |
|
$lonCluster='production'; |
|
`rm -f ../hosts.tab`; |
|
`ln -s production_hosts.tab ../hosts.tab`; |
|
$flag=1; |
|
} |
|
elsif ($choice==2) { |
|
$lonCluster='standalone'; |
|
open(OUT,'>../standalone_hosts.tab') or |
|
die("cannot open loncom/standalone_hosts.tab for output\n"); |
|
print(OUT <<END); |
|
$perlvar{'lonHostID'}:$perlvar{'lonDefDomain'}:$perlvar{'lonRole'}:$hostname:$hostaddress |
|
END |
|
close(OUT); |
|
`rm -f ../hosts.tab`; |
|
`ln -s standalone_hosts.tab ../hosts.tab`; |
|
$flag=1; |
|
} |
|
elsif ($choice==3) { |
|
$lonCluster='development'; |
|
`rm -f loncom/hosts.tab`; |
|
`ln -s development_hosts.tab ../hosts.tab`; |
|
$flag=1; |
|
} |
|
elsif ($choice==4) { |
|
$lonCluster='existing'; |
|
`rm -f ../hosts.tab`; |
|
`touch existing_hosts.tab`; |
|
if (-e '/home/httpd/lonTabs/hosts.tab') { |
|
`cp /home/httpd/lonTabs/hosts.tab ../existing_hosts.tab`; |
|
} |
|
`ln -s existing_hosts.tab ../hosts.tab`; |
|
$flag=1; |
|
} |
|
elsif ($choice==26) { |
|
$lonCluster='rawhide'; |
|
`rm -f ../hosts.tab`; |
|
`ln -s rawhide_hosts.tab ../hosts.tab`; |
|
$flag=1; |
|
} |
|
else { |
|
|
|
} |
|
} |
|
|
} |
} |
</perlscript> |
</perlscript> |