From c3646d39569323ecb45fca97fd82cd4ec1dc20a4 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 30 Oct 2007 00:30:57 +0100 Subject: [PATCH] Warn if update option is used without chroot being present --- grml-live | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/grml-live b/grml-live index 00e4a7e..2546753 100755 --- a/grml-live +++ b/grml-live @@ -305,6 +305,15 @@ else FAI_ACTION=dirinstall fi +if [ -n "$UPDATE" ] ; then + if ! [ -r "$CHROOT_OUTPUT/etc/grml_version" ] ; then + log "Error: It does not look like you have a working chroot system. Updating not possible." + eerror "Error: It does not look like you have a working chroot system. Updating not possible." + eend 1 + bailout 20 + fi +fi + if [ -d "$CHROOT_OUTPUT/bin" -a -z "$UPDATE" ] ; then log "$CHROOT_OUTPUT exists already, skipping stage 'fai dirinstall'" ewarn "$CHROOT_OUTPUT exists already, skipping stage 'fai dirinstall'" ; eend 0 -- 2.1.4