smeserver-virtualbox/root/etc/e-smith/db/configuration/migrate/virtualbox

8 lines
326 B
Plaintext

{
my $rec = $DB->get('vboxweb-service') || $DB->new_record('vboxweb-service', {type => 'service'});
if (not exists $rec{'password'}) {
my @allowed = ('a'..'z', 'A'..'Z', 0..9);
my $pass = join '', map $allowed[rand @allowed], 0..32;
my $updateconfig = $rec->set_prop('password', $pass);
}
}