summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormischa <mischa@rx.high5.nl>2020-09-23 22:19:16 +0200
committermischa <mischa@rx.high5.nl>2020-09-23 22:19:16 +0200
commit50a2546d1889afb25bf8cd0c703766a61b0fd030 (patch)
treeda1204151ed0d83fb80f6a842a645d448b85663b
parent3373bfffa59dd2a7965e46e9b54c8f0e266cb4e7 (diff)
added #fixed-address-ipv6 in dhcpd.conf for reference
-rwxr-xr-xcease.sh3
-rwxr-xr-xdeploy.pl10
-rw-r--r--email-renewal.txt1
-rwxr-xr-xemail.sh1
-rwxr-xr-xsync-it.sh2
-rw-r--r--vms/vm01.txt4
6 files changed, 15 insertions, 6 deletions
diff --git a/cease.sh b/cease.sh
index c81f0e2..7039f6b 100755
--- a/cease.sh
+++ b/cease.sh
@@ -36,11 +36,12 @@ if vmctl show ${1%.txt} >/dev/null 2>&1; then
exit 1
fi
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}
deploy.pl
rcctl restart dhcpd
vmctl reload
- dig +short -x $(grep -A2 vm26 /etc/dhcpd.conf | awk '/fixed/ {print $2}' | tr -d ';')
fi
fi
diff --git a/deploy.pl b/deploy.pl
index f72b7aa..5defecf 100755
--- a/deploy.pl
+++ b/deploy.pl
@@ -25,6 +25,7 @@
# 2020/05/10 changed: includes all install sets, inline with sysupgrade
# 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/09/20 changed: add agentx option to vm.conf for OpenBSD 6.8
#
use 5.024;
use strict;
@@ -75,11 +76,16 @@ sub render_vm_conf {
my %conf = %{$_[0]};
my %vms = %{$_[1]};
my $_etc = $conf{'conf'}{'ETC'};
+ my $_VERSION = qx(uname -r);
open my $fh_vm, ">", "$_etc/vm.conf";
printf $fh_vm "#\n# File generated by deploy.pl\n#\n";
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 "\tinterface %s\n", $conf{'conf'}{'INTERFACE'};
printf $fh_vm "}\n\n";
@@ -141,11 +147,13 @@ sub render_dhcpd_conf {
my $_disk = $conf{'conf'}{'IMAGES'} . "/" . $_instance . "." . $_disk_format;
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 $_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'};
printf $fh_dhcpd "\thost %s {\n", $_instance;
printf $fh_dhcpd "\t\thardware ethernet %s;\n", $_mac;
printf $fh_dhcpd "\t\tfixed-address %s;\n", $_ip;
+ printf $fh_dhcpd "\t\t#fixed-address-ipv6 %s;\n", $_ipv6;
if (! -e $_disk) {
printf $fh_dhcpd "\t\tfilename \"auto_install\";\n";
} else {
diff --git a/email-renewal.txt b/email-renewal.txt
index 3d926c9..93cc84c 100644
--- a/email-renewal.txt
+++ b/email-renewal.txt
@@ -1,5 +1,6 @@
From: admin
Subject: OpenBSD Amsterdam Renewal YEAR
+Content-Type: text/plain; charset=utf-8
Hi NAME,
diff --git a/email.sh b/email.sh
index 6d87208..f8b1de0 100755
--- a/email.sh
+++ b/email.sh
@@ -1,4 +1,3 @@
-
#!/bin/sh
#
# Copyright (c) 2019 Mischa Peters <mischa @ openbsd.amsterdam>
diff --git a/sync-it.sh b/sync-it.sh
index 0c7e93a..8bedaf7 100755
--- a/sync-it.sh
+++ b/sync-it.sh
@@ -1,3 +1,3 @@
#!/bin/sh
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
diff --git a/vms/vm01.txt b/vms/vm01.txt
index f1e7ade..1a21551 100644
--- a/vms/vm01.txt
+++ b/vms/vm01.txt
@@ -2,11 +2,11 @@ mac="fe:e1:ab:dd:73:a4"
ip="192.168.1.1"
instance="superduper1"
owner="testuser1"
-date="2018/06/02"
+date="2018/09/02"
payment="70"
donated=""
name="Test1 User"
-email="devtest19@openbsd.amsterdam"
+email="mischa@high5.nl"
sshkey="ssh-ed25519 AAAAC3NzDITE5AAAAik7Lmiq4l4gCoYCLkJ9wlqpNhR1gUnP5EnXJXzvMVl"
hostname="deploytest1"
username="deploytest1"