All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Anand <panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Don Zickus <dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH V5 dracut 0/3] Install kernel module for active watchdog
Date: Mon, 18 Apr 2016 18:36:14 +0530	[thread overview]
Message-ID: <20160418130614.GD28676@dhcppc6.redhat.com> (raw)
In-Reply-To: <5710BA3B.8030600-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Hi Harald,

On 15/04/2016:11:54:03 AM, Harald Hoyer wrote:
> pushed, please review my changes:
> <https://github.com/dracutdevs/dracut/commit/74e2d1e69f5527ab31b01fc19f67143d1f091980>

Thanks for rewriting the module nicely. I have to learn a lot in shell scripting :-).

I have commented at github. I found two errors during my testing:
(1) A case when install_kenrel() may not return 0 and it will cause to fail
dracut process.
(2) _wdtppath calculation before while loop need to be corrected, otherwise we
will not be able to install parent device's driver.

Following patches on top op upstream/master is working fine.

diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh
index 04686f6..d50429f 100755
--- a/modules.d/04watchdog/module-setup.sh
+++ b/modules.d/04watchdog/module-setup.sh
@@ -56,7 +56,7 @@ installkernel() {
         # however in some cases, we also need to check that if there is
         # a specific driver for the parent bus/device.  In such cases
         # we also need to enable driver for parent bus/device.
-        _wdtppath=$(readlink -f "$_dir/device/..")
+        _wdtppath=$(readlink -f "$_dir/device/")
         while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do
             _wdtppath=$(readlink -f "$_wdtppath/..")
             [[ -f "$_wdtppath/modalias" ]] || continue
@@ -73,5 +73,5 @@ installkernel() {
     done
     # ensure that watchdog module is loaded as early as possible
     _alldrivers="${!_drivers[*]}"
-    [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf
+    [[ $_alldrivers = "" ]] || echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf
 }

~Pratyush

      parent reply	other threads:[~2016-04-18 13:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16  3:39 [PATCH V5 dracut 0/3] Install kernel module for active watchdog Pratyush Anand
     [not found] ` <cover.1458099200.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-16  3:39   ` [PATCH V5 dracut 1/3] watchdog: Do not add hooks if systemd module is included Pratyush Anand
2016-03-16  3:39   ` [PATCH V5 dracut 2/3] watchdog: install module for active watchdog Pratyush Anand
2016-03-16  3:39   ` [PATCH V5 dracut 3/3] watchdog: ensure that module is loaded as early as possible Pratyush Anand
     [not found]     ` <2751555c29f26f69a63888745513edeceb39d416.1458099200.git.panand-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-16  4:05       ` [PATCH V5 dracut (Resend)3/3] " Dracut GitHub Import Bot
2016-03-16  4:18       ` [PATCH V5 dracut 3/3] " Pratyush Anand
     [not found]         ` <56E8DE95.4090308-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-17 14:08           ` Harald Hoyer
2016-04-15  9:54   ` [PATCH V5 dracut 0/3] Install kernel module for active watchdog Harald Hoyer
     [not found]     ` <5710BA3B.8030600-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-18 13:06       ` Pratyush Anand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160418130614.GD28676@dhcppc6.redhat.com \
    --to=panand-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dzickus-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.