summaryrefslogtreecommitdiff
path: root/tools/build-on-freebsd
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build-on-freebsd')
-rwxr-xr-xtools/build-on-freebsd66
1 files changed, 0 insertions, 66 deletions
diff --git a/tools/build-on-freebsd b/tools/build-on-freebsd
deleted file mode 100755
index 8436498e..00000000
--- a/tools/build-on-freebsd
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-# Since there is no official FreeBSD port yet, we need some way of building and
-# installing cloud-init. This script takes care of building and installing. It
-# will optionally make a first run at the end.
-
-fail() { echo "FAILED:" "$@" 1>&2; exit 1; }
-
-# Check dependencies:
-depschecked=/tmp/c-i.dependencieschecked
-pkgs="
- dmidecode
- e2fsprogs
- gpart
- py27-Jinja2
- py27-argparse
- py27-boto
- py27-cheetah
- py27-configobj
- py27-jsonpatch
- py27-jsonpointer
- py27-oauth
- py27-prettytable
- py27-requests
- py27-serial
- py27-six
- py27-yaml
- python
- sudo
-"
-[ -f "$depschecked" ] || pkg install ${pkgs} || fail "install packages"
-touch $depschecked
-
-# Required but unavailable port/pkg: py27-jsonpatch py27-jsonpointer
-# Luckily, the install step will take care of this by installing it from pypi...
-
-# Build the code and install in /usr/local/:
-python setup.py build
-python setup.py install -O1 --skip-build --prefix /usr/local/ --init-system sysvinit_freebsd
-
-# Install the correct config file:
-cp config/cloud.cfg-freebsd /usr/local/etc/cloud/cloud.cfg
-
-# Enable cloud-init in /etc/rc.conf:
-sed -i.bak -e "/cloudinit_enable=.*/d" /etc/rc.conf
-echo 'cloudinit_enable="YES"' >> /etc/rc.conf
-
-echo "Installation completed."
-
-if [ "$1" = "run" ]; then
- echo "Ok, now let's see if it works."
-
- # Backup SSH keys
- mv /etc/ssh/ssh_host_* /tmp/
-
- # Remove old metadata
- rm -rf /var/lib/cloud
-
- # Just log everything, quick&dirty
- rm /usr/local/etc/cloud/cloud.cfg.d/05_logging.cfg
-
- # Start:
- /usr/local/etc/rc.d/cloudinit start
-
- # Restore SSH keys
- mv /tmp/ssh_host_* /etc/ssh/
-fi