From: Harald Hoyer Date: Mon, 9 Sep 2013 14:51:44 +0000 (+0200) Subject: bcache: newer util-linux supports bcache with blkid X-Git-Tag: 033~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12beb05a73cbd3152566a3fde056daf29e42dd4a;p=thirdparty%2Fdracut.git bcache: newer util-linux supports bcache with blkid and probe-bcache should not be needed in that case --- diff --git a/modules.d/90bcache/module-setup.sh b/modules.d/90bcache/module-setup.sh index 3bb03f4e8..b02b8b4e2 100755 --- a/modules.d/90bcache/module-setup.sh +++ b/modules.d/90bcache/module-setup.sh @@ -3,7 +3,10 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh check() { - type -P probe-bcache >/dev/null || return 1 + if ! blkid -k | { while read line; do [[ $line == bcache ]] && exit 0; done; exit 1; } \ + && ! type -P probe-bcache >/dev/null; then + return 1 + fi [[ $hostonly ]] || [[ $mount_needs ]] && { for fs in "${host_fs_types[@]}"; do @@ -24,7 +27,7 @@ installkernel() { } install() { - inst_multiple probe-bcache ${udevdir}/bcache-register + blkid -k | { while read line; do [[ $line == bcache ]] && exit 0; done; exit 1; } || inst_multiple probe-bcache + inst_multiple ${udevdir}/bcache-register inst_rules 61-bcache.rules } -