summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
Diffstat (limited to 'share/scripts/debconf')
-rwxr-xr-xshare/scripts/debconf73
1 files changed, 42 insertions, 31 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 4c89e6f..4878d98 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -156,6 +156,9 @@ EOF
Chroot "${DIRECTORY}" "apt-get --yes --option APT::Force-LoopBreak=true upgrade"
Chroot "${DIRECTORY}" "apt-get --yes --option APT::Force-LoopBreak=true dist-upgrade"
+ # Install systemd support packages
+ Chroot "${DIRECTORY}" "apt-get --yes install dbus libpam-systemd systemd-sysv"
+
# Unmount systems apt cache
umount "${DIRECTORY}/var/cache/apt/archives"
@@ -224,19 +227,27 @@ Debootstrap ()
{
DIRECTORY="${1}"
+ INCLUDE="dbus"
+
+ if echo "${MIRROR}" | grep -qs '^https' || \
+ echo "{PARENT_MIRROR}" | grep -qs '^https'
+ then
+ INCLUDE="${INCLUDE},apt-transport-https,ca-certificates"
+ fi
+
# FIXME: trim down, debootstrap variants?
case "${MODE}" in
debian)
- INCLUDE="--include=ifupdown,locales,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,wget,dbus,systemd-sysv"
+ INCLUDE="${INCLUDE},ifupdown,locales,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,wget"
;;
progress-linux)
- INCLUDE="--include=apt-transport-https,ca-certificates,apt-utils,ifupdown,locales-all,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,openssh-server,wget,dbus,libpam-systemd,systemd-sysv"
+ INCLUDE="${INCLUDE},apt-utils,ifupdown,locales-all,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,openssh-server,wget"
;;
esac
mkdir -p "$(dirname ${DIRECTORY})"
- debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} ${INCLUDE} \
+ debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} --include=${INCLUDE} \
${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR}
}
@@ -319,15 +330,7 @@ EOF
esac
# Import archive keys
- case "${DISTRIBUTION}" in
- *-backports)
- KEYS="project/pgp/archive-key-${DIST}.asc project/pgp/archive-key-${DIST}-backports.asc"
- ;;
-
- *)
- KEYS="project/pgp/archive-key-${DIST}.asc"
- ;;
- esac
+ KEYS="project/pgp/archive-key-${DIST}.asc"
for KEY in ${KEYS}
do
@@ -335,7 +338,7 @@ EOF
echo "P: Fetching archive-key ${KEY_NAME}..."
wget -q "${MIRROR}/${KEY}" -O "${DIRECTORY}/key.asc"
- wget -q "${MIRROR}/${KEY}.sig" -O "${DIRECTORY}/key.asc.sig"
+ wget -q "${MIRROR}/${KEY}.gpg" -O "${DIRECTORY}/key.asc.gpg"
if [ -e /usr/bin/gpgv ]
then
@@ -350,7 +353,7 @@ EOF
echo -n "I: Verifying archive-key ${KEY_NAME} against $(basename ${KEYRING} .gpg | sed -e 's|-keyring||') keyring..."
# FIXME: doesn't work anymore when the template eventually be run with 'set -e'
- /usr/bin/gpgv --quiet --keyring ${KEYRING} "${DIRECTORY}/key.asc.sig" "${DIRECTORY}/key.asc" > /dev/null 2>&1 && KEY_VALID="true" && break
+ /usr/bin/gpgv --quiet --keyring ${KEYRING} "${DIRECTORY}/key.asc.gpg" "${DIRECTORY}/key.asc" > /dev/null 2>&1 && KEY_VALID="true" && break
fi
done
@@ -375,7 +378,7 @@ EOF
Chroot "${DIRECTORY}" "apt-key add key.asc"
rm -f "${DIRECTORY}/key.asc"
- rm -f "${DIRECTORY}/key.asc.sig"
+ rm -f "${DIRECTORY}/key.asc.gpg"
done
Chroot "${DIRECTORY}" "apt-get update"
@@ -536,11 +539,21 @@ Configure_system ()
;;
${DIST}-extras)
- echo "deb ${MIRROR} ${DIST}-extras ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ if echo "${AREA}" | grep -qs non-free
+ then
+ echo "deb ${MIRROR} ${DIST}-extras ${AREA} restricted" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ else
+ echo "deb ${MIRROR} ${DIST}-extras ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ fi
;;
${DIST}-extras-staging)
- echo "deb ${MIRROR} ${DIST}-extras-staging ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ if echo "${AREA}" | grep -qs non-free
+ then
+ echo "deb ${MIRROR} ${DIST}-extras-staging ${AREA} restricted" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ else
+ echo "deb ${MIRROR} ${DIST}-extras-staging ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ fi
;;
${DIST}-backports)
@@ -552,11 +565,21 @@ Configure_system ()
;;
${DIST}-backports-extras)
- echo "deb ${MIRROR} ${DIST}-backports-extras ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ if echo "${AREA}" | grep -qs non-free
+ then
+ echo "deb ${MIRROR} ${DIST}-backports-extras ${AREA} restricted" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ else
+ echo "deb ${MIRROR} ${DIST}-backports-extras ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ fi
;;
${DIST}-backports-extras-staging)
- echo "deb ${MIRROR} ${DIST}-backports-extras-staging ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ if echo "${AREA}" | grep -qs non-free
+ then
+ echo "deb ${MIRROR} ${DIST}-backports-extras-staging ${AREA} restricted" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ else
+ echo "deb ${MIRROR} ${DIST}-backports-extras-staging ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+ fi
;;
esac
done
@@ -726,10 +749,8 @@ EOF
eval IPV4_COMMENT="$`echo NETWORK${NUMBER}_IPV4_COMMENT`"
eval IPV4_METHOD="$`echo NETWORK${NUMBER}_IPV4_METHOD`"
eval IPV4_ADDRESS="$`echo NETWORK${NUMBER}_IPV4_ADDRESS`"
- eval IPV4_BROADCAST="$`echo NETWORK${NUMBER}_IPV4_BROADCAST`"
eval IPV4_GATEWAY="$`echo NETWORK${NUMBER}_IPV4_GATEWAY`"
eval IPV4_NETMASK="$`echo NETWORK${NUMBER}_IPV4_NETMASK`"
- eval IPV4_NETWORK="$`echo NETWORK${NUMBER}_IPV4_NETWORK`"
eval IPV4_POST_UP="$`echo NETWORK${NUMBER}_IPV4_POST_UP`"
eval IPV4_POST_DOWN="$`echo NETWORK${NUMBER}_IPV4_POST_DOWN`"
@@ -771,11 +792,6 @@ iface eth${NUMBER} inet static
address ${IPV4_ADDRESS}
EOF
- if [ -n "${IPV4_BROADCAST}" ]
- then
- echo " broadcast ${IPV4_BROADCAST}" >> "${DIRECTORY}/etc/network/interfaces.tmp"
- fi
-
if [ -n "${IPV4_GATEWAY}" ]
then
echo " gateway ${IPV4_GATEWAY}" >> "${DIRECTORY}/etc/network/interfaces.tmp"
@@ -786,11 +802,6 @@ EOF
echo " netmask ${IPV4_NETMASK}" >> "${DIRECTORY}/etc/network/interfaces.tmp"
fi
- if [ -n "${IPV4_NETWORK}" ]
- then
- echo " network ${IPV4_NETWORK}" >> "${DIRECTORY}/etc/network/interfaces.tmp"
- fi
-
if [ -n "${IPV4_POST_UP}" ]
then
echo " post-up ${IPV4_POST_UP}" >> "${DIRECTORY}/etc/network/interfaces.tmp"