- Timestamp:
- Feb 18, 2016, 3:03:33 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
0.13.2/pb/bin/pb
r2040 r2041 4936 4936 my $key = "\Q$zero1"; 4937 4937 4938 pb_system("ssh -q -o UserKnownHostsFile=/dev/null -p $nport -i $keyfile root\@$vmhost->{$ENV{'PBPROJ'}} ".'perl -c \'my $file1="$ENV{\'HOME\'}/.ssh/authorized_keys"; open(PBFILE,$file1) || die "Unable to open $file1"; open(PBOUT,"> $file1.new") || die "Unable to open $file1.new"; my $count = 0; while (<PBFILE>) { '."if (/ $key /) { \$count++; } print PBOUT \$_ if ((\$count <= 1) || (\$_ !~ / $key /)); };".'close(PBFILE); close(PBOUT); rename("$file1.new",$file1); chmod 0600,$file1; 4938 pb_system("ssh -q -o UserKnownHostsFile=/dev/null -p $nport -i $keyfile root\@$vmhost->{$ENV{'PBPROJ'}} ".'perl -c \'my $file1="$ENV{\'HOME\'}/.ssh/authorized_keys"; open(PBFILE,$file1) || die "Unable to open $file1"; open(PBOUT,"> $file1.new") || die "Unable to open $file1.new"; my $count = 0; while (<PBFILE>) { '."if (/ $key /) { \$count++; } print PBOUT \$_ if ((\$count <= 1) || (\$_ !~ / $key /)); };".'close(PBFILE); close(PBOUT); rename("$file1.new",$file1); chmod 0600,$file1;\'',"","quiet"); 4939 4939 return; 4940 4940 }
Note:
See TracChangeset
for help on using the changeset viewer.