owner is no longer a variable in the VM files
This commit is contained in:
parent
bef883c5b4
commit
63cef41a73
|
@ -108,7 +108,7 @@ sub render_vm_conf {
|
||||||
my $_disk2 = $conf{'conf'}{'IMAGES'} . "/" . $_instance . "_extra." . $_disk_format if $vms{$vm_name}{'disk2'};
|
my $_disk2 = $conf{'conf'}{'IMAGES'} . "/" . $_instance . "_extra." . $_disk_format if $vms{$vm_name}{'disk2'};
|
||||||
$_disk_format = $_disk_format eq "img" ? "raw" : $_disk_format;
|
$_disk_format = $_disk_format eq "img" ? "raw" : $_disk_format;
|
||||||
|
|
||||||
my $_owner = $vms{$vm_name}{'owner'} || $vms{$vm_name}{'username'};
|
my $_owner = $vms{$vm_name}{'username'};
|
||||||
my $_memory = $vms{$vm_name}{'memory'} || $conf{'conf'}{'MEMORY'};
|
my $_memory = $vms{$vm_name}{'memory'} || $conf{'conf'}{'MEMORY'};
|
||||||
my $_boot = $conf{'conf'}{'IMAGES'} . "/bsd.rd";
|
my $_boot = $conf{'conf'}{'IMAGES'} . "/bsd.rd";
|
||||||
my $_switch = $vms{$vm_name}{'switch'} || $conf{'conf'}{'SWITCH'};
|
my $_switch = $vms{$vm_name}{'switch'} || $conf{'conf'}{'SWITCH'};
|
||||||
|
@ -241,7 +241,7 @@ sub render_doas_conf {
|
||||||
|
|
||||||
for my $vm_name (sort keys %vms) {
|
for my $vm_name (sort keys %vms) {
|
||||||
my $_instance = $vms{$vm_name}{'instance'} || $vm_name;
|
my $_instance = $vms{$vm_name}{'instance'} || $vm_name;
|
||||||
my $_owner = $vms{$vm_name}{'owner'} || $vms{$vm_name}{'username'};
|
my $_owner = $vms{$vm_name}{'username'};
|
||||||
printf $fh_doas "permit nopass %s as root cmd pkill args -9 -xf \"vmd: %s\"\n", $_owner, $_instance;
|
printf $fh_doas "permit nopass %s as root cmd pkill args -9 -xf \"vmd: %s\"\n", $_owner, $_instance;
|
||||||
}
|
}
|
||||||
close $fh_doas;
|
close $fh_doas;
|
||||||
|
@ -256,7 +256,7 @@ sub create_accounts {
|
||||||
printf "useradd(8) users:\n";
|
printf "useradd(8) users:\n";
|
||||||
for my $vm_name (sort keys %vms) {
|
for my $vm_name (sort keys %vms) {
|
||||||
my $_instance = $vms{$vm_name}{'instance'} || $vm_name;
|
my $_instance = $vms{$vm_name}{'instance'} || $vm_name;
|
||||||
my $_owner = $vms{$vm_name}{'owner'} || $vms{$vm_name}{'username'};
|
my $_owner = $vms{$vm_name}{'username'};
|
||||||
my $_group = $conf{'conf'}{'VMDUSERS'};
|
my $_group = $conf{'conf'}{'VMDUSERS'};
|
||||||
my $_sshkey = $vms{$vm_name}{'sshkey'};
|
my $_sshkey = $vms{$vm_name}{'sshkey'};
|
||||||
my $id = getpwnam("$_owner");
|
my $id = getpwnam("$_owner");
|
||||||
|
|
Loading…
Reference in New Issue