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 ################################################################################
13 if ! [ -r $target/etc/runlevel.conf ] ; then
14 echo 'Warning: /etc/runlevel.conf does not exist...'
15 echo '... assuming we do not have file-rc, skipping 15-initsetup'
19 # keep a backup of the original runlevel.conf file for reference
20 if [ -r $target/etc/runlevel.conf.original ] ; then
21 # make sure to store old backup files if they differ as well
22 if ! cmp $target/etc/runlevel.conf $target/etc/runlevel.conf.original >/dev/null ; then
23 cp $target/etc/runlevel.conf.original $target/etc/runlevel.conf.original."$(date +%Y%m%d_%k:%M:%S)"
27 cp $target/etc/runlevel.conf $target/etc/runlevel.conf.original
29 # provide Grml's default file-rc configuration
30 fcopy -v /etc/runlevel.conf
32 # provide Grml's inittab configuration
34 sed -i "s/\$USERNAME\$/${USERNAME}/" $target/etc/inittab
36 # provide Grml's bootlocal init scripts
37 fcopy -v -mroot,root,0755 /etc/init.d/bootlocal.first
38 fcopy -v -mroot,root,0755 /etc/init.d/bootlocal.middle
39 fcopy -v -mroot,root,0755 /etc/init.d/bootlocal.last
41 ## END OF FILE #################################################################
42 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2