]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
watchdog: start traversing the device tree from the right directory
authorHarald Hoyer <harald@redhat.com>
Mon, 18 Apr 2016 13:50:42 +0000 (15:50 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 18 Apr 2016 13:50:42 +0000 (15:50 +0200)
start with the device subtree, not with the parent of it

modules.d/04watchdog/module-setup.sh

index 7b2685d4c08e94dfa9e46ed75b790e6ad98b0fe7..7566d6515763d3aba313a6999bbc7a2e6c06580d 100755 (executable)
@@ -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