Support $VISUAL and fall back to 'vi' is EDITOR is empty
[grml-live.git] / remaster / grml-live-remaster
index a42a18e..9d62cf7 100755 (executable)
@@ -4,7 +4,6 @@
 # Authors:       grml-team (grml.org), (c) Michael Schierl <schierlm@gmx.de>, (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
-# Latest change: Sun Feb 24 14:23:27 CET 2008 [mika]
 ################################################################################
 # DISCLAIMER:
 # this script currently lacks LOTS of error checking code... any help welcome...
@@ -13,6 +12,7 @@
 set -e # exit on any error
 
 VERSION='0.0.2'
+GRML_LIVE_EDITOR=${VISUAL:-${EDITOR:-vi}}
 
 # source core functions {{{
 . /etc/grml/lsb-functions
@@ -69,7 +69,7 @@ for i in dev proc root sys tmp; do
         umount /remaster/chroot/$i
 done
 
-$EDITOR /remaster/msg
+${GRML_LIVE_EDITOR} /remaster/msg
 
 [ -d /remaster/iso ] || mkdir /remaster/iso