Further /etc/runlevel.conf related fixes.
authorMichael Prokop <mika@grml.org>
Mon, 8 Nov 2010 15:32:34 +0000 (16:32 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 8 Nov 2010 15:32:34 +0000 (16:32 +0100)
TODO
etc/grml/fai/config/scripts/GRMLBASE/15-initsetup
etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot
etc/grml/fai/grml/grml_cleanup_chroot

diff --git a/TODO b/TODO
index 125b2e3..6d9accf 100644 (file)
--- a/TODO
+++ b/TODO
@@ -15,9 +15,6 @@ Patches, ideas and feedback welcome.
 
 * add support for ppc?
 
-* the /etc/runlevel.conf stuff isn’t flexible enough: adjust the file on-the-fly
-  according to what software is used/installed on the system
-
 * check out how FAI_DEBMIRROR of /etc/grml/fai/fai.conf could be merged with our
   MIRROR_DIRECTORY and MIRROR_SOURCES feature of /etc/grml/grml-live.conf
 
index 72ac501..fd8b1c6 100755 (executable)
@@ -16,21 +16,15 @@ if ! [ -r $target/etc/runlevel.conf ] ; then
 fi
 
 # keep a backup of the original runlevel.conf file for reference
-# 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 >/dev/null ; 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 >/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
+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 /etc/runlevel.conf
 
index c7d25ea..ae2d0c1 100755 (executable)
@@ -65,7 +65,6 @@ fi
 # make sure GRML_SMALL uses the appropriate configuration:
 if ifclass GRML_SMALL ; then
    cp $target/etc/inittab.small $target/etc/inittab
-   cp $target/etc/runlevel.conf.livecd.small $target/etc/runlevel.conf
 fi
 
 if ifclass RELEASE ; then
index 9e78a9f..e58bbfa 100755 (executable)
@@ -162,10 +162,6 @@ else
    ewarn "Warning: /usr/bin/grep-dctrl not available."
 fi
 
-einfo "Copying original runlevel.conf to /etc/runlevel.conf"
-cp /etc/runlevel.conf.livecd /etc/runlevel.conf
-eend $?
-
 einfo "Removing x-server-conffiles"
   rm -f /etc/X11/xorg.conf /etc/X11/XF86Config-4 \
         /etc/X11/XF86Config /etc/XF86Config /etc/XF86Config-4
@@ -355,10 +351,7 @@ fi
 # file /usr/sbin/* | grep -v ', stripped' | grep -v 'perl' | grep -v 'Bourne' | grep -v 'python' | grep -v 'symbolic link'
 #
 # Is software by grml-repos up2date?
-# grep-dctrl --field Maintainer 'Michael Prokop' /var/lib/apt/lists/grml.org_repos_._* | grep Package | awk '{print $2}' | xargs echo
-#
-# runlevel.conf:
-# for file in /etc/init.d/* ; do grep $file -q /etc/runlevel.conf.hdinstall || echo $file not found ; done
+# grep-dctrl --field Maintainer 'Michael Prokop' /var/lib/apt/lists/* | grep Package | awk '{print $2}' | xargs echo
 ################################################################################
 
 ## END OF FILE #################################################################