version 1.166.20.1, 2014/08/10 07:03:06 |
version 1.167, 2014/04/09 12:38:09 |
|
|
# with redirected output. |
# with redirected output. |
# |
# |
_rc_postprocessor_fd=9 ; export _rc_postprocessor_fd |
_rc_postprocessor_fd=9 ; export _rc_postprocessor_fd |
_rc_pid=$$ ; export _rc_pid |
|
eval "exec ${_rc_postprocessor_fd}>&1" |
eval "exec ${_rc_postprocessor_fd}>&1" |
|
|
# Print a metadata line when we exit |
# Print a metadata line when we exit |
|
|
kill -0 $RC_PID >/dev/null 2>&1 || RC_PID=$$ |
kill -0 $RC_PID >/dev/null 2>&1 || RC_PID=$$ |
|
|
# |
# |
# As long as process $RC_PID is still running, send a "nop" |
|
# metadata message to the postprocessor every few seconds. |
|
# This should help flush partial lines that may appear when |
|
# rc.d scripts that are NOT marked with "KEYWORD: interactive" |
|
# nevertheless attempt to print prompts and wait for input. |
|
# |
|
( |
|
# First detach from tty, to avoid intercepting SIGINFO. |
|
eval "exec ${_rc_original_stdout_fd}<&-" |
|
eval "exec ${_rc_original_stderr_fd}<&-" |
|
exec </dev/null >/dev/null 2>&1 |
|
while kill -0 $RC_PID ; do |
|
print_rc_metadata "nop" |
|
sleep 3 |
|
done |
|
) & |
|
|
|
# |
|
# Get a list of all rc.d scripts, and use rcorder to choose |
# Get a list of all rc.d scripts, and use rcorder to choose |
# what order to execute them. |
# what order to execute them. |
# |
# |