trying to make "nash" verbose

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

 



  (sort of a continuation of a thread on the fedora list, but that
particular issue was resolved so i can, in good conscience, start with
a related but fresh topic here.)

  how can i make the execution of the initramfs "nash" script "init"
as verbose as possible?  in the standard fedora kernels, the external
initrd file associated with each kernel is, in fact, an initramfs cpio
image, which has as its executable "init" program a "nash" script that
begins:

mount -t proc /proc /proc
setquiet
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
...

  now apparently the internal "setquiet" command causes the echo
commands to not generate any output, but i *want* to see that output,
so i went pawing thru the nash code to find the routine that allegedly
processes that command:

======================
static int
setQuietCommand(char * cmd, char * end)
{
    char *quietcmd;

    cmd = getArg(cmd, end, &quietcmd);
    if (cmd && cmd < end) {
        eprintf("setquiet: unexpected arguments\n");
        return 1;
    }

    if (cmd && !strcmp(quietcmd, "--noisy")) {
        _nash_context->reallyquiet = 0;
        _nash_context->quiet = 0;
    } else {
        quietcmd = getKernelArg("quiet");
        if (quietcmd)
            _nash_context->reallyquiet = 1;

        quietcmd = getKernelArg("noquiet");
        if (quietcmd)
            _nash_context->reallyquiet = 0;

        /* reallyquiet may be set elsewhere */
        if (_nash_context->reallyquiet)
              _nash_context->quiet = 1;
    }

    return 0;
}
=======================

  that suggests that i could add "noquiet" to the kernel parameter
line at boot time, but that didn't seem to make any difference.  (and
i'm still not sure where that output would have gone if it *had*
worked.)

  any hints?  anyone else mucked around with nash-based init scripts
and made them verbose strictly from the kernel parm line?  thanks.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux