initial commit of file from CVS for e-smith-nutUPS on Wed 12 Jul 09:01:20 BST 2023

This commit is contained in:
Brian Read
2023-07-12 09:01:20 +01:00
parent d9332aba34
commit 667523a800
63 changed files with 1241 additions and 2 deletions

View File

@@ -0,0 +1 @@
disabled

View File

@@ -0,0 +1 @@
usbhid-ups

View File

@@ -0,0 +1 @@
localhost

View File

@@ -0,0 +1 @@
disabled

View File

@@ -0,0 +1 @@
service

View File

@@ -0,0 +1,6 @@
{
my $nutmod = $DB->get_prop('nut', 'Model');
return unless $nutmod;
$DB->set_prop('nut', 'Model', 'usbhid-ups') if ($nutmod eq 'newhidups');
}

View File

@@ -0,0 +1,8 @@
{
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');
}