Provide /etc/runlevel.conf via grml-live using fcopy and its class concept
authorMichael Prokop <mika@grml.org>
Mon, 8 Nov 2010 10:56:45 +0000 (11:56 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 8 Nov 2010 10:56:45 +0000 (11:56 +0100)
etc/grml/fai/config/files/etc/runlevel.conf/GRMLBASE [new file with mode: 0644]
etc/grml/fai/config/scripts/GRMLBASE/15-initsetup

diff --git a/etc/grml/fai/config/files/etc/runlevel.conf/GRMLBASE b/etc/grml/fai/config/files/etc/runlevel.conf/GRMLBASE
new file mode 100644 (file)
index 0000000..06de79b
--- /dev/null
@@ -0,0 +1,41 @@
+############################################################################
+# You can use your favourite editor or update-rc.d(8) to modify it.
+# Read runlevel.conf(5) man page for more information about this file.
+############################################################################
+# This file was deployed via grml-live's
+# /etc/grml/fai/config/scripts/GRMLBASE/15-initsetup script, using
+# /etc/grml/fai/config/files/etc/runlevel.conf/GRMLBASE
+############################################################################
+# *IMPORTANT* This is the file used by the Grml live system.
+# Please notice that customization of this file will not work with the
+# save-config mechanism, as init takes place (and reads the file
+# /etc/runlevel.conf) before restore-config can be executed at all.
+# If you want to customize the Grml boot sequence please either
+# remaster the Grml ISO or (much simplier) just add your personal
+# stuff to the /etc/init.d/bootlocal.* scripts!
+############################################################################
+# Format:
+# <sort> <off-> <on-levels>     <command>
+01     -       2               /etc/init.d/bootsplash_start.sh
+01     -       S               /etc/init.d/bootlocal.first
+01     0,1,6   -               /etc/init.d/haltlocal.first
+02     -       S               /etc/init.d/mountkernfs.sh
+02     -       S               /etc/init.d/hostname.sh
+03     -       S               /etc/init.d/grml-udev
+04     -       S               /etc/init.d/mountdevsubfs.sh
+18     -       S               /etc/init.d/ifupdown-clean
+29     -       2               /etc/init.d/bootlocal.middle
+30     -       2,3,4,5         /etc/init.d/grml-autoconfig
+36     -       S               /etc/init.d/ifupdown
+36     -       S               /etc/init.d/udev-mtab
+38     -       S               /etc/init.d/resolvconf
+55     -       S               /etc/init.d/bootmisc.sh
+90     -       0               /etc/init.d/halt
+90     -       6               /etc/init.d/reboot
+90     -       S               /etc/init.d/rmnologin
+90     -       1               /etc/init.d/single
+98     -       2               /etc/init.d/grml-home
+99     -       2               /etc/init.d/grml-misc
+99     -       2               /etc/init.d/bootsplash_end.sh
+99     -       2               /etc/init.d/bootlocal.last
+# THE LAST LINE IS NEVER READ
index e4b28f0..72ac501 100755 (executable)
@@ -9,8 +9,6 @@
 set -u
 set -e
 
 set -u
 set -e
 
-GRML_NAME="${GRML_NAME:-grml}"
-
 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'
 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'
@@ -21,12 +19,11 @@ fi
 # but only save it as /etc/runlevel.conf.original if it's not the
 # according live system version, this should prevent from overriding
 # /etc/runlevel.conf.original if re-running grml-live with -b option.
 # but only save it as /etc/runlevel.conf.original if it's not the
 # according live system version, this should prevent from overriding
 # /etc/runlevel.conf.original if re-running grml-live with -b option.
-if ! cmp $target/etc/runlevel.conf $target/etc/runlevel.conf.livecd 1>/dev/null || \
-   ! cmp $target/etc/runlevel.conf $target/etc/runlevel.conf.livecd.small 1>/dev/null ; then
+if ! cmp $target/etc/runlevel.conf $target/etc/runlevel.conf.livecd >/dev/null ; then
 
    # make sure to store old backup files if they differ as well
    if [ -r $target/etc/runlevel.conf.original ] ; then
 
    # make sure to store old backup files if they differ as well
    if [ -r $target/etc/runlevel.conf.original ] ; then
-      if ! cmp $target/etc/runlevel.conf $target/etc/runlevel.conf.original 1>/dev/null ; then
+      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.original $target/etc/runlevel.conf.original."$(date +%Y%m%d_%k:%M:%S)"
       fi
    fi
@@ -34,14 +31,8 @@ if ! cmp $target/etc/runlevel.conf $target/etc/runlevel.conf.livecd 1>/dev/null
    cp $target/etc/runlevel.conf $target/etc/runlevel.conf.original
 fi
 
    cp $target/etc/runlevel.conf $target/etc/runlevel.conf.original
 fi
 
-# if we have a small ISO let's adjust runlevel.conf:
-if [ -n "$GRML_NAME" ] ; then
-   if echo "$GRML_NAME" | grep -q small ; then
-      cp $target/etc/runlevel.conf.livecd.small $target/etc/runlevel.conf
-   else
-      cp $target/etc/runlevel.conf.livecd $target/etc/runlevel.conf
-   fi
-fi
+# provide Grml's default file-rc configuration
+fcopy /etc/runlevel.conf
 
 ## END OF FILE #################################################################
 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3
 
 ## END OF FILE #################################################################
 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3