Make Gentoo initscript use modinfo

The -l parameter to modprobe has been removed from the latest upstream
code and this change has entered Gentoo. Using modinfo as a substitute
addresses this.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #636
This commit is contained in:
Richard Yao 2012-04-03 00:21:22 -04:00 committed by Brian Behlendorf
parent 847de12271
commit 2ce9d0ec61

View File

@ -19,7 +19,7 @@ ZFS_MODULE=zfs
checksystem() { checksystem() {
if [ ! -c /dev/zfs ]; then if [ ! -c /dev/zfs ]; then
einfo "Checking if ZFS modules present" einfo "Checking if ZFS modules present"
if [ "x$(modprobe -l $ZFS_MODULE | grep $ZFS_MODULE)" == "x" ]; then if ! modinfo zfs > /dev/null 2>&1 ; then
eerror "$ZFS_MODULE not found. Is the ZFS package installed?" eerror "$ZFS_MODULE not found. Is the ZFS package installed?"
return 1 return 1
fi fi