aboutsummaryrefslogtreecommitdiffstats
path: root/mdev/lib/sddev
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-05-19 10:02:21 +0200
committerChristoph Lohmann <20h@r-36.net>2012-05-19 10:02:21 +0200
commitdb64d569025530b743e4d2140fc10e0431ae0815 (patch)
treea2604bd495f51ad94d263c35f188ab0ae98613e4 /mdev/lib/sddev
parent7b9e5ae8574e3964f83084d647be6d6b00c04761 (diff)
downloadnldev-db64d569025530b743e4d2140fc10e0431ae0815.tar.bz2
nldev-db64d569025530b743e4d2140fc10e0431ae0815.tar.xz
devinput and /dev/fd are now correctly created.
Diffstat (limited to 'mdev/lib/sddev')
-rwxr-xr-xmdev/lib/sddev4
1 files changed, 3 insertions, 1 deletions
diff --git a/mdev/lib/sddev b/mdev/lib/sddev
index c83f38c..416ad82 100755
--- a/mdev/lib/sddev
+++ b/mdev/lib/sddev
@@ -10,7 +10,9 @@ UUID=$(echo -n "$blkidstr" \
LABEL=$(echo -n "$blkidstr" \
| grep LABEL \
| sed -e 's,.*LABEL="\([^"]*\)".*,\1,')
-BLOCK=$(cat /sys${DEVPATH}/dev)
+
+BLOCK=""
+[ -e /sys${DEVPATH}/dev ] && BLOCK=$(cat /sys${DEVPATH}/dev)
case "$ACTION" in
add|"")