mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-28 18:03:19 +02:00
function <log> should be defined before being called
This commit is contained in:
parent
99c6c73272
commit
f2f94633da
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user