From 63cef41a731238a91bc29664feb1dc17b02c40fc Mon Sep 17 00:00:00 2001 From: mischa Date: Tue, 22 Nov 2022 15:49:28 +0100 Subject: [PATCH] owner is no longer a variable in the VM files --- deploy.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy.pl b/deploy.pl index 1fe2287..e4ff9d5 100755 --- a/deploy.pl +++ b/deploy.pl @@ -108,7 +108,7 @@ sub render_vm_conf { my $_disk2 = $conf{'conf'}{'IMAGES'} . "/" . $_instance . "_extra." . $_disk_format if $vms{$vm_name}{'disk2'}; $_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 $_boot = $conf{'conf'}{'IMAGES'} . "/bsd.rd"; my $_switch = $vms{$vm_name}{'switch'} || $conf{'conf'}{'SWITCH'}; @@ -241,7 +241,7 @@ sub render_doas_conf { for my $vm_name (sort keys %vms) { 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; } close $fh_doas; @@ -256,7 +256,7 @@ sub create_accounts { printf "useradd(8) users:\n"; for my $vm_name (sort keys %vms) { 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 $_sshkey = $vms{$vm_name}{'sshkey'}; my $id = getpwnam("$_owner");