Currently we check whether udevd is in the path, then use
/dev/block/$major:$minor if it is or create and use /dev/root if it is
not.  Since udevd is now installed at /lib/systemd/systemd-udevd, this
check always fails.

We depend on udev, and it has provided /dev/block/$major:$minor since
v130 (initially in the default rules, and hard-coded since v165).  So
remove the check.

Also use 'readlink -f' to canonicalise the device name.

Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
 scripts/functions | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/scripts/functions b/scripts/functions
index adcfefa..03834c7 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -126,12 +126,7 @@ parse_numeric() {
                ;;
        esac
 
-       if command -v udevd >/dev/null 2>&1; then
-               ROOT=/dev/block/${major}:${minor}
-       else
-               mknod -m 600 /dev/root b ${major} ${minor}
-               ROOT=/dev/root
-       fi
+       ROOT="$(readlink -f /dev/block/${major}:${minor})"
 }
 
 # Parameter: device node to check
-- 
Ben Hutchings
Life would be so much easier if we could look at the source code.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to