From f56cc0dac55553cae20708f122a247af787e8af5 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 25 Apr 2012 16:11:02 +0200 Subject: [PATCH 1/1] grml-live-remaster: Slightly adjust check for running Grml session Also check for presence of /etc/grml/lsb-functions + /etc/grml/script-functions --- remaster/grml-live-remaster | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/remaster/grml-live-remaster b/remaster/grml-live-remaster index 39cc81b..92ef074 100755 --- a/remaster/grml-live-remaster +++ b/remaster/grml-live-remaster @@ -21,19 +21,25 @@ fi set -e # exit on any error -VERSION='0.0.2' +VERSION='0.0.3' GRML_LIVE_EDITOR=${VISUAL:-${EDITOR:-vi}} -if [ ! -d /etc/grml -o ! -d /live ]; then - echo "Error: $0 has to be run from a Grml live session. Exiting." - exit 1 +# source core functions {{{ +if ! [ -r /etc/grml/lsb-functions ] || ! [ -r /etc/grml/script-functions ] ; then + echo "Error: could not read /etc/grml/lsb-functions and/or /etc/grml/script-functions." >&2 + echo "Error: $0 can run only in Grml live session. Exiting." >&2 + exit 1 fi -# source core functions {{{ . /etc/grml/lsb-functions . /etc/grml/script-functions # }}} +if ! isgrmlcd ; then + echo "Error: $0 can run only in Grml live session. Exiting." >&2 + exit 1 +fi + # make sure we have what we need {{{ check4progs mkisofs stat || exit 1 -- 2.1.4