1 # Filename: functions.sh
2 # Purpose: helper functions for use within grml-live
3 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
4 # Bug-Reports: see http://grml.org/bugs/
5 # License: This file is licensed under the GPL v2.
6 # Latest change: Thu Feb 08 22:35:46 CET 2007
7 ################################################################################
10 [ -n "$1" ] && EXIT="$1" || EXIT="1"
11 [ -n "$2" ] && echo "$2">&2
22 if [[ -n "$DEBUG" ]] ; then
24 [[ -n "$DEBUG_SYSLOG" ]] && [ -x /usr/bin/logger ] && logger -t grml-live-info "$*"
31 if [[ -n "$DEBUG" ]] ; then
33 [[ -n "$DEBUG_SYSLOG" ]] && [ -x /usr/bin/logger ] && logger -t grml-live-warn "$*"
40 if [[ -n "$DEBUG" ]] ; then
41 eerror "grml-live: $*"
42 [[ -n "$DEBUG_SYSLOG" ]] && [ -x /usr/bin/logger ] && logger -t grml-live-error "$*"
50 [ -n "$TARGET" ] || bailout 1 "\$TARGET unset, can not chroot_exec"
51 [ -n "$1" ] || bailout 1 "Error executing chroot_exec. Usage: chroot_exec <command>"
55 ## END OF FILE #################################################################