From 19a0467c9284ddec4b51692d5ca50b9c96726b07 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 3 Feb 2023 17:46:18 +0100 Subject: [PATCH] Drop file-rc support file-rc used to be the init system up and until including Grml stable release 2014.11, starting with beginning of 2016 Grml switched to systemd instead. The last Debian release that used to have file-rc available was Debian/stretch, which is EOL and we don't support it neither anymore. So, good riddance! --- docs/grml-live.txt | 7 ----- etc/grml/fai/config/hooks/instsoft.GRMLBASE | 37 ++++++----------------- etc/grml/fai/config/package_config/FILE_RC | 4 --- etc/grml/fai/config/package_config/GRMLBASE | 5 --- etc/grml/fai/config/scripts/GRMLBASE/15-initsetup | 36 +--------------------- 5 files changed, 10 insertions(+), 79 deletions(-) delete mode 100644 etc/grml/fai/config/package_config/FILE_RC diff --git a/docs/grml-live.txt b/docs/grml-live.txt index 6f47da2..3d5ca3a 100644 --- a/docs/grml-live.txt +++ b/docs/grml-live.txt @@ -332,13 +332,6 @@ selected. The following classes are predefined: * DEBORPHAN: get rid of all packages listed in output of deborphan -* FILE_RC: instead of using systemd as init system use file-rc instead. file-rc -was the init system used by Grml until and including stable release 2014.11, -starting with beginning of 2016 Grml switched to systemd instead. If you want to -build a live system in the old style using file-rc instead of systemd then enable -this class. Please notice that the Grml team no longer provides support for it -though. - * FRESHCLAM: execute freshclam (if it's present) to update clamav definitions (increases resulting ISO size ~70MB). By default it's skipped to avoid bigger ISO size. diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index c9932d8..2c4a880 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -6,11 +6,6 @@ # License: This file is licensed under the GPL v2 or any later version. ################################################################################ -FILE_RC=false -if ifclass FILE_RC ; then - FILE_RC=true -fi - set -u set -e @@ -66,15 +61,16 @@ EOF # anyway $ROOTCMD /usr/lib/dpkg/methods/apt/update /var/lib/dpkg/ apt apt - if $FILE_RC ; then - echo "Installing file-rc as FILE_RC class is enabled." - # newer aptitude versions won't remove essential packages using - # 'aptitude -f -y install file-rc' anymore, therefore force it: - $ROOTCMD aptitude -o Aptitude::ProblemResolver::Keep-All-Tier=60000 -f -y install file-rc systemd-sysv- - fi - if ! $ROOTCMD test -x /usr/bin/aptitude ; then - $ROOTCMD apt-get -y install aptitude + # the apt-get update might return an error if there's for example + # a hashsum mismatch on Debian mirror sources, we might want to continue + # but should warn the user + if ! $ROOTCMD apt-get update ; then + echo "Warning: there was an error executing apt-get update, continuing anyway." + echo "Warning: there was an error executing apt-get update, continuing anyway." >&2 + fi + + $ROOTCMD apt-get -y install aptitude fi # make sure we can upgrade automatically, @@ -119,21 +115,6 @@ if ! $ROOTCMD dpkg-divert --list | grep -q '/usr/sbin/grub-probe' ; then $ROOTCMD ln -s /bin/true /usr/sbin/grub-probe fi -# make sure we have file-rc available before package_config/GRML* is being executed {{{ -# the apt-get update might return an error if there's for example -# a hashsum mismatch on Debian mirror sources, we might want to continue -# but should warn the user -if ! $ROOTCMD apt-get update ; then - echo "Warning: there was an error executing apt-get update, continuing anyway." - echo "Warning: there was an error executing apt-get update, continuing anyway." >&2 -fi - -if $FILE_RC ; then - echo "Installing file-rc as FILE_RC class is enabled." - # newer aptitude versions won't remove essential packages using - # 'aptitude -f -y install file-rc' anymore, therefore force it via: - $ROOTCMD aptitude -o Aptitude::ProblemResolver::Keep-All-Tier=60000 -f -y install file-rc systemd-sysv- -fi # }}} # we definitely don't want to fail running fai dirinstall just diff --git a/etc/grml/fai/config/package_config/FILE_RC b/etc/grml/fai/config/package_config/FILE_RC deleted file mode 100644 index 953aad2..0000000 --- a/etc/grml/fai/config/package_config/FILE_RC +++ /dev/null @@ -1,4 +0,0 @@ -PACKAGES install - -file-rc -multitail diff --git a/etc/grml/fai/config/package_config/GRMLBASE b/etc/grml/fai/config/package_config/GRMLBASE index 9199c87..156577a 100644 --- a/etc/grml/fai/config/package_config/GRMLBASE +++ b/etc/grml/fai/config/package_config/GRMLBASE @@ -84,8 +84,3 @@ firmware-zd1211 libpam-systemd systemd-container - -PACKAGES install FILE_RC -libpam-systemd- -systemd-container- -acpid diff --git a/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup b/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup index efd9e64..4b63a99 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup @@ -23,41 +23,7 @@ systemd_setup() { $ROOTCMD systemctl set-default grml-boot.target } -file_rc_setup() { - if ! [ -r "${target}"/etc/runlevel.conf ] ; then - echo 'Warning: /etc/runlevel.conf does not exist...' - echo '... assuming we do not have file-rc, skipping 15-initsetup' - exit 0 - fi - - # keep a backup of the original runlevel.conf file for reference - if [ -r "${target}"/etc/runlevel.conf.original ] ; then - # make sure to store old backup files if they differ as well - if ! cmp "${target}"/etc/runlevel.conf "${target}"/etc/runlevel.conf.original >/dev/null ; then - cp "${target}"/etc/runlevel.conf.original "${target}/etc/runlevel.conf.original.$(date +%Y%m%d_%k:%M:%S)" - fi - fi - - cp "${target}"/etc/runlevel.conf "${target}"/etc/runlevel.conf.original - - # provide Grml's default file-rc configuration - fcopy -v /etc/runlevel.conf - - # provide Grml's inittab configuration - fcopy -v /etc/inittab - sed -i "s/\$USERNAME\$/${USERNAME}/" "${target}"/etc/inittab - - # provide Grml's bootlocal init scripts - fcopy -v -mroot,root,0755 /etc/init.d/bootlocal.first - fcopy -v -mroot,root,0755 /etc/init.d/bootlocal.middle - fcopy -v -mroot,root,0755 /etc/init.d/bootlocal.last -} - -if ifclass FILE_RC ; then - file_rc_setup -else - systemd_setup -fi +systemd_setup ## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2 -- 2.1.4