X-Git-Url: http://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=scripts%2Ffunctions.sh;fp=scripts%2Ffunctions.sh;h=1f1dd2b40b9521074421c0087c7ccc7af6e8d4f6;hp=0000000000000000000000000000000000000000;hb=9dc51d74f26d10d61130c86a0f3369c3f65970b7;hpb=975b72b9779109b2d9773d112bde81ff4fa9569b diff --git a/scripts/functions.sh b/scripts/functions.sh new file mode 100644 index 0000000..1f1dd2b --- /dev/null +++ b/scripts/functions.sh @@ -0,0 +1,48 @@ +# Filename: functions.sh +# Purpose: helper functions for use within grml-live +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Thu Feb 08 22:35:46 CET 2007 +################################################################################ + +bailout(){ + [ -n "$1" ] && EXIT="$1" || EXIT="1" + exit "$EXIT" +} + +usage() { + print " + $0 .... +" +} + +debug() { + if [[ -n "$DEBUG" ]] ; then + print "grml-live: $*" + [[ -n "$DEBUG_SYSLOG" ]] && [ -x /usr/bin/logger ] && logger -t grml-live "$*" + else + return 0 # do nothing + fi +} + +cmdline_options () { + while true + do + case "${1}" in + (-r|--root) LIVE_ROOT="${2}" + shift 2 ;; + (-v|--version) usage + exit 1 ;; + (--) shift + break ;; + (*) exit 0 ;; + esac + done +} +chroot_exec() +{ +; +} + +## END OF FILE #################################################################