NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/48714: fsck prompts only appear after being answered

The following reply was made to PR bin/48714; it has been noted by GNATS.

From: Alan Barrett <>
Subject: Re: bin/48714: fsck prompts only appear after being answered
Date: Mon, 7 Apr 2014 19:27:14 +0200

 On Sun, 06 Apr 2014, Alan Barrett wrote:
 > However, /etc/rc.d/fsck and /etc/rc.d/fsck_root are not intended
 > to be interactive.  They are intended to throw an error that
 > causes the system to drop to single user mode if there's a
 > problem.  Non-default settings of fsck_flags, as appears to be the
 > case here, could cause fsck to become interactive.
 Please try the appended patch, which should cause partial lines to
 appear after a few seconds, even for scripts that are not marked with
 "KEYWORD: interactive".
 --apb (Alan Barrett)
 --- a/etc/rc
 +++ b/etc/rc
 @@ -119,6 +119,20 @@ rc_real_work()
        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.
 +      #
 +      (
 +          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
        # what order to execute them.

Home | Main Index | Thread Index | Old Index