projects/aports·blob master · refs

22 lines · 518 B

1#!/bin/sh
2
3if ! [ -e /etc/cloud/ds-identify.cfg ]; then
4 echo "Enabling cloud-init fallback for inconclusive datasource detection..."
5 cat >/etc/cloud/ds-identify.cfg <<-EOF
6 policy: search,found=all,maybe=all,notfound=enabled
7 EOF
8
9fi
10
11echo "Enabling cloud-init's boot services..."
12for i in boot/cloud-init-ds-identify \
13 boot/cloud-init-local \
14 default/cloud-config \
15 default/cloud-final \
16 default/cloud-init; do
17 if ! [ -e /etc/runlevels/$i ]; then
18 ln -s /etc/init.d/${i#*/} /etc/runlevels/$i
19 fi
20done
21
22exit 0