summaryrefslogtreecommitdiff
path: root/bin/svc_acct.export
diff options
context:
space:
mode:
authorivan <ivan>2000-03-06 14:59:06 +0000
committerivan <ivan>2000-03-06 14:59:06 +0000
commitc3f5321527ad8783f81c65f39cbb1f3612cec2e5 (patch)
tree62b0dfd47ae07420ecf1eaab43bb8e78ec9091cd /bin/svc_acct.export
parent2cc9708011a232237189440f254aea31d4ac2022 (diff)
s/sshopen2/sshopen3/ to prevent spurious mysql "Enter password: " dialog from
showing up in cron/terminal
Diffstat (limited to 'bin/svc_acct.export')
-rwxr-xr-xbin/svc_acct.export16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/svc_acct.export b/bin/svc_acct.export
index d2f746c0e..303c6d28a 100755
--- a/bin/svc_acct.export
+++ b/bin/svc_acct.export
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#
-# $Id: svc_acct.export,v 1.8 2000-03-06 14:51:27 ivan Exp $
+# $Id: svc_acct.export,v 1.9 2000-03-06 14:59:06 ivan Exp $
#
# Create and export password files: passwd, passwd.adjunct, shadow,
# acp_passwd, acp_userinfo, acp_dialup, users
@@ -38,8 +38,9 @@
# ivan@sisd.com 98-sep-18
#
# $Log: svc_acct.export,v $
-# Revision 1.8 2000-03-06 14:51:27 ivan
-# eek
+# Revision 1.9 2000-03-06 14:59:06 ivan
+# s/sshopen2/sshopen3/ to prevent spurious mysql "Enter password: " dialog from
+# showing up in cron/terminal
#
# Revision 1.2 1998/12/10 07:23:15 ivan
# use FS::Conf, need user (for datasrc)
@@ -50,7 +51,7 @@ use vars qw($conf);
use Fcntl qw(:flock);
use IO::Handle;
use FS::Conf;
-use FS::SSH qw(scp ssh sshopen2);
+use FS::SSH qw(scp ssh sshopen3);
use FS::UID qw(adminsuidsetup datasrc dbh);
use FS::Record qw(qsearch fields);
use FS::svc_acct;
@@ -356,14 +357,17 @@ foreach $radiusmachine (@radiusmachines) {
foreach my $icradiusmachine ( @icradiusmachines ) {
my( $machine, $db, $user, $pass ) = split(/\s+/, $icradiusmachine);
chdir $icradius_mysqlsource or die "Can't cd $icradius_mysqlsource: $!";
- my($reader,$writer)=(new IO::Handle, new IO::Handle);
- sshopen2("root\@$machine", $reader, $writer, "mysql --user=$user -p $db");
+ my($reader,$writer,$error)=(new IO::Handle, new IO::Handle, new IO::Handle);
+ sshopen3("root\@$machine", $reader, $writer, $error,
+ "mysql --user=$user -p $db"
+ );
print $writer "$pass\nLOCK TABLES radcheck WRITE;\n";
foreach my $file ( glob("radcheck.*") ) {
scp($file,"root\@$machine:$icradius_mysqldest/$db/$file");
}
close $writer;
close $reader;
+ close $error;
}
unlink $spoollock;