summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGonéri Le Bouder <goneri@lebouder.net>2020-03-26 16:07:51 -0400
committerGitHub <noreply@github.com>2020-03-26 16:07:51 -0400
commit44039629e539ed48298703028ac8f10ad3c60d6e (patch)
treec806fe54818f44148e6e37bf02cac1ea1e868610 /tools
parent4c88d9341e75a1a14ba2e8bd0ab309e265229f7e (diff)
downloadvyos-cloud-init-44039629e539ed48298703028ac8f10ad3c60d6e.tar.gz
vyos-cloud-init-44039629e539ed48298703028ac8f10ad3c60d6e.zip
add Openbsd support (#147)
- tested on OpenBSD 6.6 - tested on OpenStack without config drive, and NoCloud with ISO config drive
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build-on-openbsd27
-rwxr-xr-xtools/render-cloudcfg5
2 files changed, 30 insertions, 2 deletions
diff --git a/tools/build-on-openbsd b/tools/build-on-openbsd
new file mode 100755
index 00000000..ca028606
--- /dev/null
+++ b/tools/build-on-openbsd
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+fail() { echo "FAILED:" "$@" 1>&2; exit 1; }
+
+# Check dependencies:
+depschecked=/tmp/c-i.dependencieschecked
+pkgs="
+ bash
+ dmidecode
+ py3-configobj
+ py3-jinja2
+ py3-jsonschema
+ py3-oauthlib
+ py3-requests
+ py3-setuptools
+ py3-six
+ py3-yaml
+ sudo--
+"
+[ -f "$depschecked" ] || pkg_add ${pkgs} || fail "install packages"
+
+touch $depschecked
+
+python3 setup.py build
+python3 setup.py install -O1 --distro openbsd --skip-build
+
+echo "Installation completed."
diff --git a/tools/render-cloudcfg b/tools/render-cloudcfg
index 50f85369..9322b2c3 100755
--- a/tools/render-cloudcfg
+++ b/tools/render-cloudcfg
@@ -4,8 +4,9 @@ import argparse
import os
import sys
-VARIANTS = ["amazon", "arch", "centos", "debian", "fedora", "freebsd", "netbsd",
- "rhel", "suse", "ubuntu", "unknown"]
+VARIANTS = ["amazon", "arch", "centos", "debian", "fedora", "freebsd",
+ "netbsd", "openbsd", "rhel", "suse", "ubuntu", "unknown"]
+
if "avoid-pep8-E402-import-not-top-of-file":
_tdir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))