diff --git a/boxes/ubuntu/appliance.kiwi b/boxes/ubuntu/appliance.kiwi index 3b09644..9bf70be 100644 --- a/boxes/ubuntu/appliance.kiwi +++ b/boxes/ubuntu/appliance.kiwi @@ -106,14 +106,15 @@ + + + + + + + - - - - - - diff --git a/boxes/ubuntu/post_bootstrap.sh b/boxes/ubuntu/post_bootstrap.sh new file mode 100644 index 0000000..264687f --- /dev/null +++ b/boxes/ubuntu/post_bootstrap.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -ex + +# Intermediate C locale setup +export LANG=C.UTF-8 +export LANGUAGE= + +# Intermediate Noninteractive debconf +echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections + +# Download packages for which we need the script code +apt-get -q -c /kiwi_apt.conf -y --no-install-recommends install \ + "-oDebug::pkgDPkgPm=1" "-oDPkg::Pre-Install-Pkgs::=cat >/tmp/postpacks" \ +base-passwd + +# Run package scripts for core OS packages which provides +# mandatory setup code in their pre/post scripts +export DPKG_ROOT=/ +while read -r package;do + pushd "$(dirname "${package}")" || exit 1 + if [ "$(basename "${package}")" = "base-passwd.deb" ];then + # Required to create passwd, groups, the root user... + dpkg -e "${package}" + test -e DEBIAN/preinst && bash DEBIAN/preinst install + test -e DEBIAN/postinst && bash DEBIAN/postinst + rm -rf DEBIAN + fi + popd || exit 1 +done < /tmp/postpacks +rm -f /tmp/postpacks