mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
55e73df23b
Submitted by: anders@fix.no
15 lines
439 B
Perl
15 lines
439 B
Perl
#!/usr/bin/perl
|
|
my $file = $ARGV[0];
|
|
my $seed = '';
|
|
my $i;
|
|
my $patt = "./0123456789abcdefghijklmnopqrstuvwxyzQWERTYUIOPASDFGHJKLZXCVBNM";
|
|
die unless $file;
|
|
srand;
|
|
for( $i = 1; $i <= 40; $i++ ) {
|
|
$seed = $seed . substr( $patt, int( rand() * 64 ), 1 );
|
|
}
|
|
open OUT, ">>$file" || die "Cannot open output file";
|
|
print OUT "\n## Set cookie_seed to value generated during install\n";
|
|
printf OUT '$cookie_seed="%s";'."\n", $seed;
|
|
close( OUT );
|