2 # Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/15-initsetup
3 # Purpose: configure init system for the live-system
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2 or any later version.
7 ################################################################################
14 fcopy -M -i -B -v -r /etc/systemd
16 echo "Enabling user '$USERNAME' for autologin"
17 sed -i "s/\$USERNAME/$USERNAME/" "$target"/etc/systemd/system/getty@tty*.service.d/override.conf
19 $ROOTCMD systemctl preset-all
20 $ROOTCMD systemctl set-default grml-boot.target
24 if ! [ -r "${target}"/etc/runlevel.conf ] ; then
25 echo 'Warning: /etc/runlevel.conf does not exist...'
26 echo '... assuming we do not have file-rc, skipping 15-initsetup'
30 # keep a backup of the original runlevel.conf file for reference
31 if [ -r "${target}"/etc/runlevel.conf.original ] ; then
32 # make sure to store old backup files if they differ as well
33 if ! cmp "${target}"/etc/runlevel.conf "${target}"/etc/runlevel.conf.original >/dev/null ; then
34 cp "${target}"/etc/runlevel.conf.original "${target}/etc/runlevel.conf.original.$(date +%Y%m%d_%k:%M:%S)"
38 cp "${target}"/etc/runlevel.conf "${target}"/etc/runlevel.conf.original
40 # provide Grml's default file-rc configuration
41 fcopy -v /etc/runlevel.conf
43 # provide Grml's inittab configuration
45 sed -i "s/\$USERNAME\$/${USERNAME}/" "${target}"/etc/inittab
47 # provide Grml's bootlocal init scripts
48 fcopy -v -mroot,root,0755 /etc/init.d/bootlocal.first
49 fcopy -v -mroot,root,0755 /etc/init.d/bootlocal.middle
50 fcopy -v -mroot,root,0755 /etc/init.d/bootlocal.last
53 if ifclass FILE_RC ; then
59 ## END OF FILE #################################################################
60 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2