|
|
|
@ -224,6 +224,32 @@ install_apt_transport_https () {
|
|
|
|
|
-y --no-install-recommends install apt-transport-https
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
install_fai_setup_storage () {
|
|
|
|
|
echo "Installing fai-setup-storage (it is missing on GRML 'small')"
|
|
|
|
|
|
|
|
|
|
if [ "$(dpkg-query -f "\${db:Status-Status} \${db:Status-Eflag}" -W fai-setup-storage 2>/dev/null)" = 'installed ok' ]; then
|
|
|
|
|
echo "fai-setup-storage is already installed, nothing to do about it."
|
|
|
|
|
return 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# use temporary apt database for speed reasons
|
|
|
|
|
local TMPDIR
|
|
|
|
|
TMPDIR=$(mktemp -d)
|
|
|
|
|
mkdir -p "${TMPDIR}/etc/preferences.d" "${TMPDIR}/statedir/lists/partial" \
|
|
|
|
|
"${TMPDIR}/cachedir/archives/partial"
|
|
|
|
|
echo "deb http://${DEBIAN_REPO_HOST}/debian/ ${DEBIAN_RELEASE} main contrib non-free" > \
|
|
|
|
|
"${TMPDIR}/etc/sources.list"
|
|
|
|
|
|
|
|
|
|
DEBIAN_FRONTEND='noninteractive' apt-get -o dir::cache="${TMPDIR}/cachedir" \
|
|
|
|
|
-o dir::state="${TMPDIR}/statedir" -o dir::etc="${TMPDIR}/etc" \
|
|
|
|
|
-o dir::etc::trustedparts="/etc/apt/trusted.gpg.d/" update
|
|
|
|
|
|
|
|
|
|
DEBIAN_FRONTEND='noninteractive' apt-get -o dir::cache="${TMPDIR}/cachedir" \
|
|
|
|
|
-o dir::etc="${TMPDIR}/etc" -o dir::state="${TMPDIR}/statedir" \
|
|
|
|
|
-o dir::etc::trustedparts="/etc/apt/trusted.gpg.d/" \
|
|
|
|
|
-y --no-install-recommends install fai-setup-storage
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776917
|
|
|
|
|
debootstrap_upgrade() {
|
|
|
|
|
local required_version=1.0.87
|
|
|
|
@ -1169,6 +1195,7 @@ echo "root:sipwise" | chpasswd
|
|
|
|
|
|
|
|
|
|
## partition disk
|
|
|
|
|
set_deploy_status "disksetup"
|
|
|
|
|
install_fai_setup_storage
|
|
|
|
|
|
|
|
|
|
# 2000GB = 2097152000 blocks in /proc/partitions - so make a rough estimation
|
|
|
|
|
if [ "$(awk "/ ${DISK}$/ {print \$3}" /proc/partitions)" -gt 2000000000 ] ; then
|
|
|
|
|