X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=grml-debootstrap;h=97b1927b560134757d4b2fcc174e6e5f8a2a3caf;hb=9506ba5c75a7baaefed8611bae9412734bf73e99;hp=823d876768eadab34bb5ae766e38043ac909feae;hpb=31e65a1924740192b8ee249fd0f97b59a33c571b;p=grml-debootstrap.git diff --git a/grml-debootstrap b/grml-debootstrap index 823d876..97b1927 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -72,7 +72,7 @@ MNTPOINT="/mnt/debootstrap.$$" [ -n "$POST_SCRIPTS" ] || POST_SCRIPTS='yes' [ -n "$PRE_SCRIPTS" ] || PRE_SCRIPTS='yes' [ -n "$RECONFIGURE" ] || RECONFIGURE='console-data' -[ -n "$RELEASE" ] || RELEASE='buster' +[ -n "$RELEASE" ] || RELEASE='bullseye' [ -n "$RM_APTCACHE" ] || RM_APTCACHE='yes' [ -n "$SCRIPTS" ] || SCRIPTS='no' # deprecated, replaced by POST_SCRIPTS [ -n "$SECURE" ] || SECURE='yes' @@ -103,7 +103,7 @@ Bootstrap options: -m, --mirror Mirror which should be used for apt-get/aptitude. -i, --iso Mountpoint where a Debian ISO is mounted to, for use instead of fetching packages from a mirror. - -r, --release Release of new Debian system (default: buster). + -r, --release Release of new Debian system (default: bullseye). -t, --target Target partition (/dev/...) or directory where the system should be installed to. -p, --mntpoint Mountpoint used for mounting the target system, @@ -779,7 +779,7 @@ prompt_for_bootmanager() # ask for Debian release {{{ prompt_for_release() { - [ -n "$RELEASE" ] && DEFAULT_RELEASE="$RELEASE" || DEFAULT_RELEASE='buster' + [ -n "$RELEASE" ] && DEFAULT_RELEASE="$RELEASE" || DEFAULT_RELEASE='bullseye' RELEASE="$(dialog --stdout --title "${PN}" --default-item $DEFAULT_RELEASE --menu \ "Please enter the Debian release you would like to use for installation:" \ 0 50 8 \ @@ -987,14 +987,18 @@ format_efi_partition() { # check for EFI support or try to enable it {{{ efi_support() { - if lsmod | grep -q efivars ; then + local efivars_loaded=false + if modprobe efivars &>/dev/null ; then + efivars_loaded=true + fi + + if [ -d /sys/firmware/efi ] ; then einfo "EFI support detected." ; eend 0 return 0 fi - if modprobe efivars &>/dev/null ; then - einfo "EFI support enabled now." ; eend 0 - return 0 + if ! [ -d /sys/firmware/efi ] && [ "${efivars_loaded:-}" = "true" ] ; then + einfo "EFI support detected, but system seems to be running in BIOS mode." fi return 1 @@ -1158,7 +1162,7 @@ fi # Support for generic release codenames is unavailable. {{{ if [ "$RELEASE" = "stable" ] || [ "$RELEASE" = "testing" ] ; then eerror "Generic release codenames (stable, testing) are unsupported. \ -Please use specific codenames such as stretch or buster." ; eend 1 +Please use specific codenames such as buster or bullseye." ; eend 1 bailout 1 fi # }}} @@ -1851,7 +1855,8 @@ iface ${interface} inet dhcp AUTHORIZED_KEYS_TARGET="${MNTPOINT}/root/.ssh/" einfo "Copying '${AUTHORIZED_KEYS_SOURCE}' to '${AUTHORIZED_KEYS_TARGET}' as requested via --sshcopyauth option." - mkdir -m 0700 -p "${AUTHORIZED_KEYS_TARGET}" + mkdir -p "${AUTHORIZED_KEYS_TARGET}" + chmod 0700 "${AUTHORIZED_KEYS_TARGET}" if cp "${AUTHORIZED_KEYS_SOURCE}" "${AUTHORIZED_KEYS_TARGET}" ; then eend 0 else