* 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.
# 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
# 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,
$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
$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