From a2c1016f5b127d60afda917273188fbaef73c596 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Tue, 26 Nov 2024 16:17:50 +0100 Subject: [PATCH 1/5] scripts: remove GRMLBASE/37-portmap Was only relevant for portmap, long replaced with rpcbind. Debian buster already has rpcbind, probably also the release before that. --- debian/grml-live.maintscript | 1 + .../fai/config/scripts/GRMLBASE/37-portmap | 29 ------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100755 etc/grml/fai/config/scripts/GRMLBASE/37-portmap diff --git a/debian/grml-live.maintscript b/debian/grml-live.maintscript index 59e8b54fc..93a2794f5 100644 --- a/debian/grml-live.maintscript +++ b/debian/grml-live.maintscript @@ -4,6 +4,7 @@ rm_conffile /etc/grml/fai/config/files/etc/inittab/GRML_SMALL 0.43.0~ rm_conffile /etc/grml/fai/config/files/etc/lsb-base-logging.sh/GRMLBASE 0.42.3~ rm_conffile /etc/grml/fai/config/files/etc/systemd/system/serial-getty@ttyS0.service.d/override.conf/GRMLBASE 0.33.2~ rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/36-cpufrequtils 0.33.0~ +rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/37-portmap 0.49.2~ rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/40-deborphan 0.35.0~ rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/93-update-usbids 0.45.0~ rm_conffile /etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_SID 0.47.10~ diff --git a/etc/grml/fai/config/scripts/GRMLBASE/37-portmap b/etc/grml/fai/config/scripts/GRMLBASE/37-portmap deleted file mode 100755 index d7a426c29..000000000 --- a/etc/grml/fai/config/scripts/GRMLBASE/37-portmap +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/37-portmap -# Purpose: configure portmap of live-system -# Authors: grml-team (grml.org), (c) Michael Prokop -# Bug-Reports: see http://grml.org/bugs/ -# License: This file is licensed under the GPL v2 or any later version. -################################################################################ - -set -u -set -e - -# Work around a bug in the portmap package, see -# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=317358 - -CONFFILE="$target/etc/default/portmap" - -# modify only if the file is present, nowadays we have rpcbind -if [ -r "$CONFFILE" ] ; then - # modify it iff we have portmap's default configuration - if grep -q '^OPTIONS="-i 127.0.0.1"' "$CONFFILE" ; then - # disable the "-i 127.0.0.1" configuration so it works e.g. with - # grml-terminalserver OOTB: - printf "Removing loopback-interface-only option (workaround #317358) in /etc/default/portmap: " - sed -i 's/^OPTIONS.*/# OPTIONS="-i 127.0.0.1"/' "$CONFFILE" && echo OK || echo ERROR - fi -fi - -## END OF FILE ################################################################# -# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2 From 24961d1d6366ea8b3fffeae50be4b44e5c869bc2 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Tue, 26 Nov 2024 16:22:09 +0100 Subject: [PATCH 2/5] scripts: remove workaround for 2009-era unfixed Debian bugs --- etc/grml/fai/config/scripts/GRMLBASE/39-modprobe | 5 ----- 1 file changed, 5 deletions(-) diff --git a/etc/grml/fai/config/scripts/GRMLBASE/39-modprobe b/etc/grml/fai/config/scripts/GRMLBASE/39-modprobe index 849809d15..51b543720 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/39-modprobe +++ b/etc/grml/fai/config/scripts/GRMLBASE/39-modprobe @@ -9,11 +9,6 @@ set -u set -e -# Make sure all modprobe configuration files use .conf as filename suffix. -# See http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=module-init-tools;dist=unstable -# and http://blog.bofh.it/debian/id_236 -find $target/etc/modprobe.d -maxdepth 1 -type f ! -name \*\.conf -exec mv {} {}.conf \; - # Install all present modprobe.d configuration files fcopy -v -i -r /etc/modprobe.d From 4af3d127fb97a885c1d993e34568e1195b8dc2e7 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Tue, 26 Nov 2024 16:26:20 +0100 Subject: [PATCH 3/5] scripts: remove iceweasel support Debian buster was the last release with iceweasel, but it also already had firefox-esr. --- etc/grml/fai/config/scripts/GRMLBASE/90-update-alternatives | 5 ----- 1 file changed, 5 deletions(-) diff --git a/etc/grml/fai/config/scripts/GRMLBASE/90-update-alternatives b/etc/grml/fai/config/scripts/GRMLBASE/90-update-alternatives index 9c3d1885a..808a866d2 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/90-update-alternatives +++ b/etc/grml/fai/config/scripts/GRMLBASE/90-update-alternatives @@ -52,11 +52,6 @@ if $ROOTCMD update-alternatives --list x-cursor-theme 2>/dev/null | grep -q '/wh $ROOTCMD update-alternatives --set x-cursor-theme /etc/X11/cursors/whiteglass.theme fi -if $ROOTCMD update-alternatives --list x-www-browser 2>/dev/null | grep -q '/iceweasel' ; then - echo "Setting iceweasel as x-www-browser using update-alternatives." - $ROOTCMD update-alternatives --set x-www-browser /usr/bin/iceweasel -fi - if $ROOTCMD update-alternatives --list x-www-browser 2>/dev/null | grep -q '/firefox-esr' ; then echo "Setting firefox-esr as x-www-browser using update-alternatives." $ROOTCMD update-alternatives --set x-www-browser /usr/bin/firefox-esr From 1a40680ac547bbcfc334e13ac0c25b22572e8107 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Tue, 26 Nov 2024 16:31:16 +0100 Subject: [PATCH 4/5] scripts: assume timeout is always available Debian buster has timeout in coreutils, which is Essential: yes. --- .../fai/config/scripts/GRMLBASE/91-update-pciids | 10 ++-------- .../fai/config/scripts/GRMLBASE/92-update-freshclam | 11 ++--------- .../config/scripts/GRMLBASE/94-update-smart-drivedb | 12 ++---------- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids b/etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids index 07666b103..f5a3e5d55 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids +++ b/etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids @@ -31,7 +31,6 @@ bailout() { } -[ -x $target/usr/bin/timeout ] && TIMEOUT="10" || TIMEOUT="" if ! [ -x "${target}/usr/sbin/update-pciids" ] && ! [ -x "${target}/usr/bin/update-pciids" ] ; then echo "Warning: update-pciids not installed (neither /usr/sbin/update-pciids nor /usr/bin/update-pciids exists" @@ -39,13 +38,8 @@ if ! [ -x "${target}/usr/sbin/update-pciids" ] && ! [ -x "${target}/usr/bin/upda fi echo "Updating PCI-IDs" -if [ -n "$TIMEOUT" ] ; then - $ROOTCMD timeout $TIMEOUT update-pciids - bailout $? -else - $ROOTCMD update-pciids - bailout $? -fi +$ROOTCMD timeout 10 update-pciids +bailout $? ## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2 diff --git a/etc/grml/fai/config/scripts/GRMLBASE/92-update-freshclam b/etc/grml/fai/config/scripts/GRMLBASE/92-update-freshclam index 3275bb113..ac0b316e2 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/92-update-freshclam +++ b/etc/grml/fai/config/scripts/GRMLBASE/92-update-freshclam @@ -37,21 +37,14 @@ bailout() { exit "${1:-0}" } -[ -x $target/usr/bin/timeout ] && TIMEOUT="10" || TIMEOUT="" - if ! [ -x $target/usr/bin/freshclam ] ; then echo "freshclam not installed" exit 0 fi echo "Updating clamav database via running freshclam" -if [ -n "$TIMEOUT" ] ; then - $ROOTCMD timeout $TIMEOUT /usr/bin/freshclam - bailout $? -else - $ROOTCMD /usr/bin/freshclam - bailout $? -fi +$ROOTCMD timeout 10 /usr/bin/freshclam +bailout $? ## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2 diff --git a/etc/grml/fai/config/scripts/GRMLBASE/94-update-smart-drivedb b/etc/grml/fai/config/scripts/GRMLBASE/94-update-smart-drivedb index 1b98ef666..ffce016be 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/94-update-smart-drivedb +++ b/etc/grml/fai/config/scripts/GRMLBASE/94-update-smart-drivedb @@ -14,22 +14,14 @@ fi set -u set -e -[ -x $target/usr/bin/timeout ] && TIMEOUT="10" || TIMEOUT="" - if ! [ -x ${target}/usr/sbin/update-smart-drivedb ] ; then echo "NOTE: update-smart-drivedb not present (possibly smartmontools >=6.4+svn4214-1 present)" exit 0 fi echo "Updating smartmontool drivedb" -if [ -n "$TIMEOUT" ] ; then - if ! $ROOTCMD timeout $TIMEOUT update-smart-drivedb ; then - echo "Warning: failed to update smartmontool drivedb, ignoring failure" - fi -else - if ! $ROOTCMD update-smart-drivedb ; then - echo "Warning: failed to update smartmontool drivedb, ignoring failure" - fi +if ! $ROOTCMD timeout 10 update-smart-drivedb ; then + echo "Warning: failed to update smartmontool drivedb, ignoring failure" fi ## END OF FILE ################################################################# From b373401f1839012149f7e89703462b5e94c76b43 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Tue, 26 Nov 2024 16:40:07 +0100 Subject: [PATCH 5/5] scripts: assume utmp,wtmp are on tmpfs /run --- etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot | 7 ------- 1 file changed, 7 deletions(-) diff --git a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot index 3b07e5edb..51fc2a10d 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot +++ b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot @@ -127,13 +127,6 @@ zero ${target}/var/account/pacct \ ${target}/var/log \ ${target}/var/mail/grml -# on /run we don't have to create it -if [ -d ${target}/var/run ] ; then - echo "Recreate empty utmp and wtmp" - :>${target}/var/run/utmp - :>${target}/var/run/wtmp -fi - if ! [ -x $target/usr/sbin/update-ca-certificates ] ; then echo "Warning: update-ca-certificates not installed" else