From: Michael Prokop Date: Mon, 8 Nov 2010 15:32:34 +0000 (+0100) Subject: Further /etc/runlevel.conf related fixes. X-Git-Tag: v0.12.0~19 X-Git-Url: http://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=3e5fb2360b0df8563ade7c0ec43acf655698fc13 Further /etc/runlevel.conf related fixes. --- diff --git a/TODO b/TODO index 125b2e3..6d9accf 100644 --- 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 diff --git a/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup b/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup index 72ac501..fd8b1c6 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup @@ -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 diff --git a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot index c7d25ea..ae2d0c1 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot +++ b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot @@ -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 diff --git a/etc/grml/fai/grml/grml_cleanup_chroot b/etc/grml/fai/grml/grml_cleanup_chroot index 9e78a9f..e58bbfa 100755 --- a/etc/grml/fai/grml/grml_cleanup_chroot +++ b/etc/grml/fai/grml/grml_cleanup_chroot @@ -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 #################################################################