DJ Lucas wrote:
> On 07/17/2011 02:51 PM, Bruce Dubbs wrote:
>> DJ Lucas wrote:
> 
>>> Actually, this check needs to be removed. It causes issues for the alsa
>>> script and also setclock (if used to set hwclock when network goes down
>>> in RL2).
>> Wouldn't this be just as easy as creating symlinks S50setclock in rc0
>> and rc6 in the LFS Makefile?  In the same way, creating S35alsa symlinks
>> in the BLFS Makefile would save the asla settings.
>>
> 
> 
> No. Drop to RL1 with alsa volumes restored via udev for an example of 
> why that block should be removed. It doesn't matter for 0 and 6 because 
> the check is skipped. It's been a while, but IIRC, the same thing for a 
> K??setclock link in RL2. 

I don't understand.  What we have now is:

for i in $( ls -v /etc/rc.d/rc${runlevel}.d/S* 2> /dev/null)
do
    if [ "${previous}" != "N" ]; then
       suffix=${i#/etc/rc.d/rc$runlevel.d/S[0-9][0-9]}
       stop=/etc/rc.d/rc$runlevel.d/K[0-9][0-9]$suffix
       prev_start=/etc/rc.d/rc$previous.d/S[0-9][0-9]$suffix

       [ -f ${prev_start} ] && [ ! -f ${stop} ] && continue
    fi

    check_script_status

    case ${runlevel} in
       0|6)
          ${i} stop
          ;;
       *)
          ${i} start
          ;;
    esac
    error_value=${?}

    if [ "${error_value}" != "0" ]; then
       print_error_msg
    fi
done

In rc1.d I have K30sshd, K80network, K90sysklogd, S25random.  The same 
in rc2.d.  setclock is executed in rcsysinit.

If I add S50setclock and S40alsa to rc{0,6}.d, the '-f ${prev_start}' 
fails and the continue is never executed.  The command is run with the 
stop parameter in both cases and does the right thing, AFAICT.

> This is proper IMO when using NTP, but not really useful in practice. 

Agree, except if the hw clock is too far off, ntp is unhappy.

> I don't do this any longer, but with the 
> gradual change to udev scripts handling start up items instead of boot 
> scripts for specific hardware (this will likely happen whether we like 
> it or not), it would probably be good to be prepared for it (not to 
> mention the alsa breakage that is there now).

Are you suggesting that we just remove the 'if' block above?  I'd think 
that might add some strange failures at shutdown, but shouldn't hurt 
anything.

   -- Bruce

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to