| 1 |
#!/bin/bash |
| 2 |
#================ |
| 3 |
# FILE : image.sh |
| 4 |
#---------------- |
| 5 |
# PROJECT : openSUSE KIWI Image System |
| 6 |
# COPYRIGHT : (c) 2006 SUSE LINUX Products GmbH. All rights reserved |
| 7 |
# : |
| 8 |
# AUTHOR : Marcus Schaefer <[email protected]> |
| 9 |
# : |
| 10 |
# BELONGS TO : Operating System images |
| 11 |
# : |
| 12 |
# DESCRIPTION : configuration script for SUSE based |
| 13 |
# : operating systems |
| 14 |
# : |
| 15 |
# : |
| 16 |
# STATUS : BETA |
| 17 |
#---------------- |
| 18 |
|
| 19 |
test -f /.kconfig && . /.kconfig |
| 20 |
test -f /.profile && . /.profile |
| 21 |
|
| 22 |
if [[ "${kiwi_iname}" = *"OpenStack"* ]]; then |
| 23 |
# disable jeos-firstboot service |
| 24 |
# We need to install it because it provides files required in the |
| 25 |
# overlay for the image. However, the service itself is something that |
| 26 |
# requires interaction on boot, which is not good for OpenStack, and the |
| 27 |
# interaction actually doesn't bring any benefit in OpenStack. |
| 28 |
systemctl mask jeos-firstboot.service |
| 29 |
|
| 30 |
# enable cloud-init services |
| 31 |
suseInsertService cloud-init-local |
| 32 |
suseInsertService cloud-init |
| 33 |
suseInsertService cloud-config |
| 34 |
suseInsertService cloud-final |
| 35 |
|
| 36 |
echo '*** adjusting cloud.cfg for openstack' |
| 37 |
sed -i -e '/mount_default_fields/{adatasource_list: [ NoCloud, OpenStack, None ] |
| 38 |
}' /etc/cloud/cloud.cfg |
| 39 |
fi |