[Netpass-devel] NetPass CHANGES,1.22,1.23 install,1.26,1.27
Brought to you by:
jeffmurphy
From: jeff m. <jef...@us...> - 2005-12-22 18:31:11
|
Update of /cvsroot/netpass/NetPass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17502 Modified Files: CHANGES install Log Message: resetport fixes, install script fix Index: CHANGES =================================================================== RCS file: /cvsroot/netpass/NetPass/CHANGES,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- CHANGES 12 Oct 2005 20:39:42 -0000 1.22 +++ CHANGES 22 Dec 2005 18:31:02 -0000 1.23 @@ -256,3 +256,13 @@ jcm bug fix. resetport.pl, bug in findThread caused most jobs to get assigned to same thread, possibly resulting in long delays. +2005-12-23 + jcm bug fix. resetport.pl. bug in quarantine/linkdown processing if you + had linkflap tolerance enabled but port-polling disabled. it would + ignore the linkflap tolerance setting. + jcm resetport.pl added feature for port polling. if linkup on a port but + no mac appears on the port for N seconds (settable) resetport will + drop the port from the work queue. + jcm bug fix. apparently i missed a routine in the install script, causing + it to error out. + Index: install =================================================================== RCS file: /cvsroot/netpass/NetPass/install,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- install 16 Aug 2005 14:04:31 -0000 1.26 +++ install 22 Dec 2005 18:31:02 -0000 1.27 @@ -249,9 +249,9 @@ Enter an SMTP server here: "); patchConf("/etc", "inittab", { '%SMTPHOST%' => $smtp_server }); +configureNPSVC($PKGDIR."/etc/npsvc-example.conf", $TARGET."/etc/npsvc.conf"); lsystem("/sbin/init q"); -configureNPSVC($TARGET); my $squidRV = patchSquidConf($PKGDIR, "install.d/squid.conf"); @@ -1259,6 +1259,28 @@ } +sub configureNPSVC { + my $cf = shift; + my $sf = shift; + + # edit npsvc.conf + + print "\nWe use 'npsvc' to make sure critical processes are running.\n"; + my $em = ask ("Enter an email address that npsvc can mail if it spots something wrong: "); + my $fh = new FileHandle $cf, "r"; + ldie "failed to open $cf for reading: $!" unless defined $cf; + my $f2 = new FileHandle $sf, "w"; + ldie "failed to open $sf for writing: $!" unless defined $sf; + while(my $line = <$fh>) { + $line =~ s/%EMAIL%/$em/g; + print $f2 $line; + } + $fh->close; + $f2->close; + lprint "NPSVC configuration file installed to $sf\n"; +} + + sub makeCookiesDir { if (-d '/cookies') { lprint ("Looks like /cookies already exists.\n"); |