Improve logging, trap SIGALRM
This commit is contained in:
parent
05a5eb4752
commit
a7e5f8989a
@ -106,8 +106,10 @@ fsexec() {
|
||||
local file="$1"
|
||||
local filename="$(basename -- "$file")"
|
||||
local logfile="$_optlogdir/$filename.log"
|
||||
log "Inspecting configuration file: $filename" 2
|
||||
if gettarget "$file"; then
|
||||
# It's a defaults file with a selected target
|
||||
log "File is an fsdefaults file" 2
|
||||
target="$_return"
|
||||
log "Found target for $filename: \"$target\""
|
||||
[ -n "$_optdryrun" ] && return
|
||||
@ -118,6 +120,7 @@ fsexec() {
|
||||
bash -c "$target" > "$logfile" 2>&1 &
|
||||
elif [ $? = 50 ] && [ -x "$file" ]; then
|
||||
# It's a shell script or executable symlink
|
||||
log "File is an executable" 2
|
||||
log "Executing file: \"$filename\""
|
||||
[ -n "$_optdryrun" ] && return
|
||||
"$file" > "$logfile" 2>&1 &
|
||||
@ -422,7 +425,8 @@ main() {
|
||||
if ! has basename; then
|
||||
error "Failed to find program: $_return" 1
|
||||
fi
|
||||
|
||||
# Fixes random SIGALRM bug
|
||||
trap : SIGALRM
|
||||
# Do the do
|
||||
firestart
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user