]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
do not write real-root-dev, if value to be written is 0
authorElan Ruusamäe <glen@delfi.ee>
Tue, 13 May 2014 21:08:09 +0000 (00:08 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 13 May 2014 21:08:09 +0000 (00:08 +0300)
geninitrd

index ec7ebbb6dddf1e0c43cc7bc08435a2bc4d33e379..8773697746585c5ab6dee2472571b193275acd16 100755 (executable)
--- a/geninitrd
+++ b/geninitrd
@@ -859,7 +859,7 @@ initrd_gen_setrootdev() {
                        if [ -z "$rootnr" -a -e "$ROOT" ]; then
                                rootnr="$(busybox ls -lL ${ROOT} | busybox awk '{if (/^b/) { print 256 * $3 + $4; }}')"
                        fi
-                       if [ -n "$rootnr" ]; then
+                       if [ "$rootnr" -gt 0 ]; then
                                echo "$rootnr" > /proc/sys/kernel/real-root-dev
                        fi
                fi
This page took 0.057359 seconds and 4 git commands to generate.