From 088fef04f9106288d97830ea81375ec80f095286 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 5 Aug 2009 16:44:37 +0200 Subject: [PATCH] Check for existence of $target/etc/apt/important_note.txt before operating on it --- debian/changelog | 4 +++- etc/grml/fai/config/hooks/instsoft.GRMLBASE | 4 +++- etc/grml/fai/config/hooks/updatebase.GRMLBASE | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 41a248b..b1fe376 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,10 @@ grml-live (0.9.21) UNRELEASED; urgency=low * Provide information about grml-live version and Debian/suite through /etc/grml_live_version in the generated ISO. [Closes: issue637] * grml-cheatcodes: document bootoption 'nostartx'. + * Check for existence of $target/etc/apt/important_note.txt before + operating on it. - -- Michael Prokop Wed, 05 Aug 2009 15:16:57 +0200 + -- Michael Prokop Wed, 05 Aug 2009 16:44:16 +0200 grml-live (0.9.20) unstable; urgency=low diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index 213f39c..a678e38 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -83,7 +83,9 @@ else # no softupdate but fresh installation if [ -r /etc/grml/fai/files/etc/apt ] ; then cp -a /etc/grml/fai/files/etc/apt/* $target/etc/apt/ # remove grml-live's sources.list file from chroot: - grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt + if [ -r $target/etc/apt/important_note.txt ] ; then + grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt + fi fi # install all present (but at least the grml) gpg keys: diff --git a/etc/grml/fai/config/hooks/updatebase.GRMLBASE b/etc/grml/fai/config/hooks/updatebase.GRMLBASE index b04e0ba..a501682 100755 --- a/etc/grml/fai/config/hooks/updatebase.GRMLBASE +++ b/etc/grml/fai/config/hooks/updatebase.GRMLBASE @@ -31,7 +31,9 @@ else # no softupdate but updating chroot based on /etc/grml/fai/config/basefiles if [ -r /etc/grml/fai/files/etc/apt ] ; then cp -a /etc/grml/fai/files/etc/apt/* $target/etc/apt/ # remove grml-live's sources.list file from chroot: - grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt + if [ -r $target/etc/apt/important_note.txt ] ; then + grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt + fi fi # install all present (but at least the grml) gpg keys: -- 2.1.4