e-smith-nutUPS/root/etc/e-smith/db/configuration/migrate/nutPass

9 lines
503 B
Plaintext
Raw Permalink Normal View History

{
use MIME::Base64 qw(encode_base64);
my $nutrec = $DB->get('nut') || $DB->new_record('nut', {type => 'service'});
$nutrec->set_prop('MasterPass', sprintf("%15.0f", int( (1000000000000000) * rand() ))) if not $nutrec->prop('MasterPass');
$nutrec->set_prop('SlavePass', sprintf("%15.0f", int( (1000000000000000) * rand() ))) if not $nutrec->prop('SlavePass');
$nutrec->set_prop('AdminPass', sprintf("%15.0f", int( (1000000000000000) * rand() ))) if not $nutrec->prop('AdminPass');
}