From 8efad5c2d113d02caea9de491a267f068b52f8f2 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 15 Oct 2008 23:04:06 +0200 Subject: [PATCH] Install policy-rc.d via /etc/grml/fai/config/hooks/updatebase.GRMLBASE --- debian/changelog | 5 ++++- etc/grml/fai/config/hooks/updatebase.GRMLBASE | 11 ++++++++++- etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot | 9 ++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 21870a9..d407cd3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,11 @@ grml-live (0.9.5) unstable; urgency=low [Closes: issue552] * Drop xserver-xorg-video-newport from all flavours. * Replace all unzoo package references with zoo, see #497775. + * Install policy-rc.d via /etc/grml/fai/config/hooks/updatebase.GRMLBASE, + otherwise installing additional software will fail if any daemons + are started up and /proc (mounted via FAI's updatebase) is missing. - -- Michael Prokop Wed, 15 Oct 2008 22:58:56 +0200 + -- Michael Prokop Wed, 15 Oct 2008 23:03:15 +0200 grml-live (0.9.4) unstable; urgency=low diff --git a/etc/grml/fai/config/hooks/updatebase.GRMLBASE b/etc/grml/fai/config/hooks/updatebase.GRMLBASE index 359c7ba..6187260 100755 --- a/etc/grml/fai/config/hooks/updatebase.GRMLBASE +++ b/etc/grml/fai/config/hooks/updatebase.GRMLBASE @@ -4,12 +4,21 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Sun Dec 16 13:56:58 CET 2007 [mika] ################################################################################ if [ "$FAI_ACTION" = "softupdate" ] ; then # we want to use our own sources.list: skiptask updatebase + # make sure we don't start any daemons - removed + # later on via /etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot + if ! [ -r $target/usr/sbin/policy-rc.d ] ; then + cat > $target/usr/sbin/policy-rc.d << EOF +#!/bin/sh +# FAI_ACTION=updatebase +exit 101 +EOF + chmod 755 $target/usr/sbin/policy-rc.d + fi # skip the task if we want to build a new ISO only: [ -n "$BUILD_ONLY" ] && skiptask instsoft fi diff --git a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot index be8c47f..a8d807d 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot +++ b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot @@ -4,11 +4,18 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Thu Sep 18 01:32:11 CEST 2008 [mika] ################################################################################ set -e +# check for policy-rc.d workaround of +# /etc/grml/fai/config/hooks/updatebase.GRMLBASE +if [ -r $target/usr/sbin/policy-rc.d ] ; then + if grep -q 'FAI_ACTION=updatebase' $target/usr/sbin/policy-rc.d ; then + rm -f $target/usr/sbin/policy-rc.d + fi +fi + # remove some big directories when using class LATEX_CLEANUP: if ifclass LATEX_CLEANUP ; then cp /etc/grml/fai/grml/grml_cleanup_chroot.latex_cleanup $target/root/ -- 2.1.4