freebsd-ports/sysutils/linux-megamgr/files/megamgr.sh.in
Boris Samorodov 0c3c828c94 LSI Logic MegaRAID Megamgr Release
This is the Linux console based management utility for the LSI
MegaRAID family of controllers.

FreeBSD >= 6.1 supports running this tool by the means of the
amr_linux.ko kernel module and the /dev/megadev0 device.

Author:	LSI Logic Corporation
WWW:	http://www.lsi.com/

PR:		ports/102917
Submitted by:	Patrick M. Hausen (pmh at hausen.com)
2006-09-07 06:14:52 +00:00

24 lines
349 B
Bash

#!/bin/sh
# check for root user
#
if [ `id -u` -ne 0 ]
then
echo You must be root to run `basename $0`.
exit 1
fi
# check for active amr_linux.ko
#
if ! kldstat -q -m amr_linux
then
if kldload amr_linux
then
echo 'amr_linux module loaded.'
else
echo 'amr_linux module failed to load.'
exit 1
fi
fi
exec %%PREFIX%%/libexec/megamgr.bin