added #fixed-address-ipv6 in dhcpd.conf for reference
This commit is contained in:
parent
3373bfffa5
commit
50a2546d18
3
cease.sh
3
cease.sh
|
@ -36,11 +36,12 @@ if vmctl show ${1%.txt} >/dev/null 2>&1; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if vmctl show ${1%.txt} | grep stopped >/dev/null 2>&1; then
|
if vmctl show ${1%.txt} | grep stopped >/dev/null 2>&1; then
|
||||||
|
echo -n "Current rDNS: "
|
||||||
|
dig +short -x $(grep -A2 ${1%.txt} /etc/dhcpd.conf | awk '/fixed/ {print $2}' | tr -d ';')
|
||||||
remove.pl ${1}
|
remove.pl ${1}
|
||||||
deploy.pl
|
deploy.pl
|
||||||
rcctl restart dhcpd
|
rcctl restart dhcpd
|
||||||
vmctl reload
|
vmctl reload
|
||||||
dig +short -x $(grep -A2 vm26 /etc/dhcpd.conf | awk '/fixed/ {print $2}' | tr -d ';')
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
10
deploy.pl
10
deploy.pl
|
@ -25,6 +25,7 @@
|
||||||
# 2020/05/10 changed: includes all install sets, inline with sysupgrade
|
# 2020/05/10 changed: includes all install sets, inline with sysupgrade
|
||||||
# 2020/05/22 changed: set the hosts password for the users
|
# 2020/05/22 changed: set the hosts password for the users
|
||||||
# 2020/05/24 changed: add staggered option to vm.conf, leave disable for now
|
# 2020/05/24 changed: add staggered option to vm.conf, leave disable for now
|
||||||
|
# 2020/09/20 changed: add agentx option to vm.conf for OpenBSD 6.8
|
||||||
#
|
#
|
||||||
use 5.024;
|
use 5.024;
|
||||||
use strict;
|
use strict;
|
||||||
|
@ -75,11 +76,16 @@ sub render_vm_conf {
|
||||||
my %conf = %{$_[0]};
|
my %conf = %{$_[0]};
|
||||||
my %vms = %{$_[1]};
|
my %vms = %{$_[1]};
|
||||||
my $_etc = $conf{'conf'}{'ETC'};
|
my $_etc = $conf{'conf'}{'ETC'};
|
||||||
|
my $_VERSION = qx(uname -r);
|
||||||
|
|
||||||
open my $fh_vm, ">", "$_etc/vm.conf";
|
open my $fh_vm, ">", "$_etc/vm.conf";
|
||||||
printf $fh_vm "#\n# File generated by deploy.pl\n#\n";
|
printf $fh_vm "#\n# File generated by deploy.pl\n#\n";
|
||||||
printf $fh_vm "socket owner :%s\n", $conf{'conf'}{'VMDUSERS'};
|
printf $fh_vm "socket owner :%s\n", $conf{'conf'}{'VMDUSERS'};
|
||||||
printf $fh_vm "staggered start parallel 2 delay 90\n\n";
|
printf $fh_vm "staggered start parallel 2 delay 90\n";
|
||||||
|
if ($_VERSION > 6.7) {
|
||||||
|
printf $fh_vm "agentx\n";
|
||||||
|
}
|
||||||
|
printf $fh_vm "\n";
|
||||||
printf $fh_vm "switch \"%s\" {\n", $conf{'conf'}{'SWITCH'};
|
printf $fh_vm "switch \"%s\" {\n", $conf{'conf'}{'SWITCH'};
|
||||||
printf $fh_vm "\tinterface %s\n", $conf{'conf'}{'INTERFACE'};
|
printf $fh_vm "\tinterface %s\n", $conf{'conf'}{'INTERFACE'};
|
||||||
printf $fh_vm "}\n\n";
|
printf $fh_vm "}\n\n";
|
||||||
|
@ -141,11 +147,13 @@ sub render_dhcpd_conf {
|
||||||
my $_disk = $conf{'conf'}{'IMAGES'} . "/" . $_instance . "." . $_disk_format;
|
my $_disk = $conf{'conf'}{'IMAGES'} . "/" . $_instance . "." . $_disk_format;
|
||||||
my $_mac = $vms{$vm_name}{'mac'} || $conf{'conf'}{'MAC_PREFIX'} . ":" . $vms{$vm_name}{'vm_number'};
|
my $_mac = $vms{$vm_name}{'mac'} || $conf{'conf'}{'MAC_PREFIX'} . ":" . $vms{$vm_name}{'vm_number'};
|
||||||
my $_ip = $vms{$vm_name}{'ip'} || $conf{'conf'}{'IP_PREFIX'} . "." . ($conf{'conf'}{'IP_START'} + $vms{$vm_name}{'vm_number'});
|
my $_ip = $vms{$vm_name}{'ip'} || $conf{'conf'}{'IP_PREFIX'} . "." . ($conf{'conf'}{'IP_START'} + $vms{$vm_name}{'vm_number'});
|
||||||
|
my $_ipv6 = $conf{'conf'}{'IPV6_PREFIX'} . ":" . ($conf{'conf'}{'IPV6_START'} + $vms{$vm_name}{'vm_number'}) . "::" . ($conf{'conf'}{'IP_START'} + $vms{$vm_name}{'vm_number'});
|
||||||
my $_hostname = $vms{$vm_name}{'hostname'};
|
my $_hostname = $vms{$vm_name}{'hostname'};
|
||||||
|
|
||||||
printf $fh_dhcpd "\thost %s {\n", $_instance;
|
printf $fh_dhcpd "\thost %s {\n", $_instance;
|
||||||
printf $fh_dhcpd "\t\thardware ethernet %s;\n", $_mac;
|
printf $fh_dhcpd "\t\thardware ethernet %s;\n", $_mac;
|
||||||
printf $fh_dhcpd "\t\tfixed-address %s;\n", $_ip;
|
printf $fh_dhcpd "\t\tfixed-address %s;\n", $_ip;
|
||||||
|
printf $fh_dhcpd "\t\t#fixed-address-ipv6 %s;\n", $_ipv6;
|
||||||
if (! -e $_disk) {
|
if (! -e $_disk) {
|
||||||
printf $fh_dhcpd "\t\tfilename \"auto_install\";\n";
|
printf $fh_dhcpd "\t\tfilename \"auto_install\";\n";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
From: admin
|
From: admin
|
||||||
Subject: OpenBSD Amsterdam Renewal YEAR
|
Subject: OpenBSD Amsterdam Renewal YEAR
|
||||||
|
Content-Type: text/plain; charset=utf-8
|
||||||
|
|
||||||
Hi NAME,
|
Hi NAME,
|
||||||
|
|
||||||
|
|
1
email.sh
1
email.sh
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 Mischa Peters <mischa @ openbsd.amsterdam>
|
# Copyright (c) 2019 Mischa Peters <mischa @ openbsd.amsterdam>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
OPTIONS=${1:--qa}
|
OPTIONS=${1:--qa}
|
||||||
/usr/local/bin/rsync ${OPTIONS} /etc /var/www/htdocs /home/mischa backup.openbsd.amsterdam::obsdams/$(hostname -s)
|
/usr/local/bin/rsync ${OPTIONS} /etc /home/mischa /var/nsd /var/unbound /var/www n1.high5.nl::obsdams/$(hostname -s) --del
|
||||||
|
|
|
@ -2,11 +2,11 @@ mac="fe:e1:ab:dd:73:a4"
|
||||||
ip="192.168.1.1"
|
ip="192.168.1.1"
|
||||||
instance="superduper1"
|
instance="superduper1"
|
||||||
owner="testuser1"
|
owner="testuser1"
|
||||||
date="2018/06/02"
|
date="2018/09/02"
|
||||||
payment="70"
|
payment="70"
|
||||||
donated=""
|
donated=""
|
||||||
name="Test1 User"
|
name="Test1 User"
|
||||||
email="devtest19@openbsd.amsterdam"
|
email="mischa@high5.nl"
|
||||||
sshkey="ssh-ed25519 AAAAC3NzDITE5AAAAik7Lmiq4l4gCoYCLkJ9wlqpNhR1gUnP5EnXJXzvMVl"
|
sshkey="ssh-ed25519 AAAAC3NzDITE5AAAAik7Lmiq4l4gCoYCLkJ9wlqpNhR1gUnP5EnXJXzvMVl"
|
||||||
hostname="deploytest1"
|
hostname="deploytest1"
|
||||||
username="deploytest1"
|
username="deploytest1"
|
||||||
|
|
Loading…
Reference in New Issue