--- loncom/build/Attic/postinstall.pl 2000/11/20 22:52:05 1.2 +++ loncom/build/Attic/postinstall.pl 2000/12/28 23:14:35 1.11 @@ -9,22 +9,37 @@ open OUT, ">/etc/hosts.deny"; print OUT "ALL: ALL\n"; close OUT; -if (1==0) { # get wget and install system('lynx -source http://install.lon-capa.org/3.1/SupplementalRPMS/wget-1.5.3-6.i386.rpm > wget-1.5.3-6.i386.rpm'); -system('rpm','-Uvh','--force','wget-1.5.3-6.i386.rpm'); +system('rpm -Uvh --force wget-1.5.3-6.i386.rpm'); # download SupplementalRPMS and install -system('wget','-r','http://install.lon-capa.org/3.1/SupplementalRPMS'); -system('rpm','-Uvh','--force','install.lon-capa.org/3.1/SupplementalRPMS'); +system('wget','-r','-np','http://install.lon-capa.org/3.1/SupplementalRPMS'); +system('rpm -Uvh --force install.lon-capa.org/3.1/SupplementalRPMS/*.rpm'); # download remove_extra.sh and run -system('wget','http://install.lon-capa.org/3.1/scripts/remove_extra.sh'); +system('wget','-r','-np','http://install.lon-capa.org/3.1/scripts/remove_extra.sh'); system('sh','./remove_extra.sh'); # download FinalRPMS and install -system('wget','-r','http://install.lon-capa.org/3.1/FinalRPMS'); -system('rpm','-Uvh','--force','install.lon-capa.org/3.1/FinalRPMS'); +system('wget','-r','-np','http://install.lon-capa.org/3.1/FinalRPMS'); +system('rpm -Uvh --force install.lon-capa.org/3.1/FinalRPMS/*.rpm'); + +my $okay=0; +DEV: while ($okay==0) { + print "\n\nWill this machine be used to develop future LON-CAPA software? (y/n)\n"; + my $input=<>; + if ($input=~/^y/i) { + $okay=1; + } + elsif ($input=~/^n/i) { + last DEV; + } +} +if (!$okay) { + system('wget','http://install.lon-capa.org/3.1/scripts/remove_extra_dev.sh'); + system('sh','./remove_extra_dev.sh'); +} # allow entry of new access.conf parameters my @perlsetvars=("lonHostID","lonRole","lonAdmEMail","lonDefDomain","lonLoadLim","lonExpire"); @@ -66,7 +81,7 @@ instructors, or any other class of user. END ); my $template=`/bin/cat /etc/httpd/conf/access.conf`; -my $okay=0; +$okay=0; while ($okay==0) { foreach my $psv (@perlsetvars) { print "\n"; @@ -97,7 +112,7 @@ foreach my $psv (@perlsetvars) { open OUT,">/etc/smb.conf"; print OUT $template; close OUT; -} + # unshadow passwords # change this line in /etc/pam.d/login # password required /lib/security/pam_pwdb.so nullok use_authtok md5 shadow @@ -155,8 +170,6 @@ print OUT "www:$input1\n"; close OUT; system('stty echo'); - -if (1==0) { # create mime.types link `ln -s /etc/mime.types /etc/httpd/conf/mime.types`; @@ -168,16 +181,65 @@ system('/etc/rc.d/init.d/httpd','restart # fix the setup of init.d processes # nfs -# atalk +# bash$ diff nfs nfs~ +# 6c6 +# < # chkconfig: 345 60 20 +# --- +# > # chkconfig: - 60 20 +# then chkconfig +$template=`/bin/cat /etc/rc.d/init.d/nfs`; +$template=~s/\# chkconfig: - 60 20/\# chkconfig: 345 60 20/; +open OUT,">/etc/rc.d/init.d/nfs"; +print OUT $template; +close OUT; +$template=`/bin/cat /etc/rc.d/init.d/xntpd`; +$template=~s/\# chkconfig: - 55 10/\# chkconfig: 345 55 10/; +open OUT,">/etc/rc.d/init.d/xntpd"; +print OUT $template; +close OUT; + +# ntp +# chkconfig 345 +# then chkconfig # make atalk specific modifications -# /etc/services -# /etc/atalk/conf +# /etc/atalk/config +open OUT, ">/etc/atalk/config"; +print OUT <; split(/\\s+/); print "LONCAPA_\$_[2]"; +'` +# Set which daemons to run: +PAPD_RUN=no +AFPD_RUN=yes +# Control whether the daemons are started in the background +ATALK_BGROUND=no +END +close OUT; +# /etc/conf.modules should have this line +# alias net-pf-5 appletalk +# depmod -a +$template=`/bin/cat /etc/conf.modules`; +$template.="alias net-pf-5 appletalk\n"; +open OUT, ">/etc/conf.modules"; +print OUT $template; +close OUT; +system('depmod -a'); -# restart nfs, smb, and atalk services +# restart nfs, smb, xntpd and atalk services system('/etc/rc.d/init.d/smb','restart'); system('/etc/rc.d/init.d/atalk','restart'); - +system('/etc/rc.d/init.d portmap','stop'); +system('/etc/rc.d/init.d nfs','stop'); +system('/etc/rc.d/init.d portmap','start'); +system('/etc/rc.d/init.d nfs','start'); +system('/etc/rc.d/init.d/smb','restart'); +system('/etc/rc.d/init.d/inet','restart'); +system('/etc/rc.d/init.d/xntpd','restart'); # restart loncontrol print "Please be patient while loncontrol services are restarted (approximately 10 minutes).\n"; @@ -192,4 +254,3 @@ different than that needed for LON-CAPA, must make appropriate adjustment to the /etc/hosts.allow file. END -}