From aa63773295e1e74c3ec69684f4a70162f4560c82 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Mon, 8 Feb 2010 22:56:17 -0300 Subject: [PATCH] Fix path when looking at /sys/block for rootdev otherwise will access to /sys/block//sys/block/sda/sda1/dev (for example) Signed-off-by: Gerardo Exequiel Pozzi --- init | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/init b/init index 823355c..88cefc1 100644 --- a/init +++ b/init @@ -122,7 +122,7 @@ if [ -z "${nfsroot}" -a "${root}" != "/dev/nfs" ]; then else for dir in /sys/block/*; do if [ -f ${dir}/${root:5}/dev ]; then - rootdev="$(cat /sys/block/${dir}/${root:5}/dev | sed 's|:| |')" + rootdev="$(cat ${dir}/${root:5}/dev | sed 's|:| |')" break fi done -- 1.6.6.1