# Bug-Reports: see https://grml.org/bugs/
# License: This file is licensed under the GPL v2+
################################################################################
+# shellcheck disable=SC2001,SC2181
# error_handler {{{
[ -n "$REPORT_TRAP_ERR" ] || REPORT_TRAP_ERR='no'
# variables {{{
PN="$(basename "$0")"
if [[ -d "$(dirname "$(command -v "$0")")"/.git ]]; then
- VERSION="$(git --git-dir $(dirname "$(command -v "$0")")/.git describe | sed 's|^v||')"
+ VERSION="$(git --git-dir "$(dirname "$(command -v "$0")")"/.git describe | sed 's|^v||')"
else
VERSION="$(dpkg-query --show --showformat='${Version}' "$PN")"
fi
[ "$_opt_contrib" ] && COMPONENTS="$COMPONENTS contrib"
case "${RELEASE}" in
- lenny|squeeze|wheezy|jessie|stretch|buster|bullseye)
+ jessie|stretch|buster|bullseye)
[ "$_opt_non_free" ] && COMPONENTS="$COMPONENTS non-free"
;;
*)
NUM_PARTITIONS=$(( NUM_PARTITIONS + 1 ))
done < "$TMPFILE"
-# force metadata version 0.90 for lenny so old grub can boot from this array.
-METADATA_VERSION=""
-if [ "$RELEASE" = "lenny" ]; then
- METADATA_VERSION="-e0"
-fi
-
ERRORFILE=$(mktemp)
# shellcheck disable=SC2086
yes | mdadm --create "${TARGET}" --level="${RAIDLEVEL}" \
- --raid-devices="${NUM_PARTITIONS}" ${METADATA_VERSION} ${SELECTED_PARTITIONS} >/dev/null 2>$ERRORFILE
+ --raid-devices="${NUM_PARTITIONS}" ${SELECTED_PARTITIONS} >/dev/null 2>$ERRORFILE
RC=$?
if [ "$RC" = 0 ] ; then
dialog --title "$PN" --msgbox \
# so disable this feature for older Debian releases where it's known to be unsupported
if [ -n "$MKFS" ] && [ "$MKFS" = "mkfs.ext4" ] ; then
case "$RELEASE" in
- lenny|squeeze|wheezy|jessie)
+ jessie)
# assume a more recent version if we can't identify the version via dpkg-query
local e2fsprogs_version
e2fsprogs_version="$(dpkg-query --show --showformat='${Version}' e2fsprogs 2>/dev/null || echo 1.44)"
# Disable this feature for Debian releases older than bookworm
if [ -n "$MKFS" ] && [ "$MKFS" = "mkfs.ext4" ] ; then
case "$RELEASE" in
- lenny|squeeze|wheezy|jessie|stretch|buster|bullseye)
+ jessie|stretch|buster|bullseye)
local e2fsprogs_version
# assume a more recent version if we can't identify the version via dpkg-query
e2fsprogs_version="$(dpkg-query --show --showformat='${Version}' e2fsprogs 2>/dev/null || echo 1.47)"
eerror "Error: grub not installed inside Virtual Machine. Can not install bootloader." ; eend 1
bailout 1
fi
-
- case "$RELEASE" in
- lenny|squeeze|wheezy)
- cp "${MNTPOINT}"/usr/lib/grub/i386-pc/* "${MNTPOINT}/boot/grub/"
- ;;
- *)
- cp -a "${MNTPOINT}"/usr/lib/grub/i386-pc "${MNTPOINT}/boot/grub/"
- ;;
- esac
+ cp -a "${MNTPOINT}"/usr/lib/grub/i386-pc "${MNTPOINT}/boot/grub/"
if [ -n "$VMEFI" ]; then
einfo "Installing default /etc/network/interfaces as requested via --defaultinterfaces options."
mkdir -p "${MNTPOINT}/etc/network"
echo "$DEFAULT_INTERFACES" > "${MNTPOINT}/etc/network/interfaces"
+ # shellcheck disable=SC2320
eend $?
elif [ -n "$VIRTUAL" ] ; then
einfo "Setting up Virtual Machine, installing default /etc/network/interfaces"
mkdir -p "${MNTPOINT}/etc/network"
echo "$DEFAULT_INTERFACES" > "${MNTPOINT}/etc/network/interfaces"
+ # shellcheck disable=SC2320
eend $?
elif [ -r /etc/network/interfaces ] ; then
einfo "Copying /etc/network/interfaces from host to target system"
ewarn "Couldn't read /etc/network/interfaces, installing default /etc/network/interfaces"
mkdir -p "${MNTPOINT}/etc/network"
echo "$DEFAULT_INTERFACES" > "${MNTPOINT}/etc/network/interfaces"
+ # shellcheck disable=SC2320
eend $?
fi