From: Michael Prokop Date: Mon, 29 Oct 2007 23:30:57 +0000 (+0100) Subject: Warn if update option is used without chroot being present X-Git-Tag: 0.0.7~16 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=c3646d39569323ecb45fca97fd82cd4ec1dc20a4 Warn if update option is used without chroot being present --- 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