| 1 | #!/bin/sh |
| 2 | |
| 3 | if ! [ -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 | |
| 9 | fi |
| 10 | |
| 11 | echo "Enabling cloud-init's boot services..." |
| 12 | for 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 |
| 20 | done |
| 21 | |
| 22 | exit 0 |