1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 21:34:04 +02:00

function <log> should be defined before being called

This commit is contained in:
Mirko Vogt 2010-05-02 23:27:11 +02:00
parent 99c6c73272
commit f2f94633da

View File

@ -89,6 +89,11 @@ fi
mkdir -p ${WORKING_DIR}
date > "${LOG_FILE}" # purge logfile if exists
function log() {
echo "$1"
echo "$1" >> "${LOG_FILE}"
}
function abort() {
log "$1"
log "==="
@ -96,11 +101,6 @@ function abort() {
exit 1
}
function log() {
echo "$1"
echo "$1" >> "${LOG_FILE}"
}
[ "$(whoami)" == "root" ] || abort "this script must be run as root"
log "working dir: ${WORKING_DIR}"