}
eval_gettext()
{
- eval printf "$*"
+ eval echo "$*"
}
else
. gettext.sh
load_all_modules()
{
- local mod=`basename "$1" .ko`
- shift 1
+ local mod=`basename "$1" .ko.gz`
+ if [ "$1" ]; then
+ shift 1
+ fi
if [ -z "$mod" ]
then
fi
if modprobe -q $mod
then
+ echo >&2 "recurse:$*"
load_all_modules $*
if [ $? -ne 0 ]
then
{
## Check - Require effective UID of root
- if [ $EUID != 0 ]; then
+ if [ $(id -u) != 0 ]; then
report_error "You must be root to install PowerPath."
error_exit
fi
/sbin/powermt load > /dev/null 2>&1
fi
-## Do we have modules that work with this kernel?
-
- TAG=`identify_platform \`uname -r\``
- if [ -z "$TAG" ]; then
- report_error "This PowerPath package does not support this kernel."
- report_error '$PPBASE'
- error_exit
- fi
-
## Check driver vermagic
- verify_driver_vermagic $PPBASE/bin/driver/$TAG/emcp.ko
+ verify_driver_vermagic /lib/modules/$(uname -r)/kernel/drivers/block/emcp.ko.gz
if [ $? != 0 ]; then
report_error 'PowerPath driver version magic mismatch'
error_exit
EOF
fi
- copy_file $PPBASE/modprobe.conf.pp $modprobe_file
+ copy_file /etc/modprobe.d/$(uname -r)/EMCpower.conf $modprobe_file
## Update the managedclass parameter line
#-----------------------------------------------------------------------
install_driver_modules()
{
+ return # already cames from rpm package
for os in /lib/modules/*
do
case $os in
# SuSE x86_64 specific:
#
-EXPECTED_VENDOR=suse
-VENDOR_NAME=Suse
+EXPECTED_VENDOR=pld
+VENDOR_NAME=PLD
VENDOR_OS_NAME=SLES10SP1
EXPECTED_ISA=x86_64
-EXPECTED_OS_REV=10sp1
+EXPECTED_OS_REV=ac
MIN_UPGRADE_REV=5.0.0
check_vendor_rev()
{
-if [ "`cat /etc/SuSE-release | awk '$1 == "PATCHLEVEL" {print $3}'`" == "1" ]
+if [ "`awk '/Ac/{print 1}' /etc/pld-release`" == "1" ]
then
sles_version=$EXPECTED_OS_REV
else
## Load new modules. Emcplib and emcp first, emcpdm and emcpioc last
## with everything else in between.
-load_all_modules `ls $PPBASE/bin/driver/$TAG | \
- awk '/^emcplib.ko$/ {order[$1]=1; next}
- /^emcp.ko$/ {order[$1]=2; next}
- /^emcpdm.ko$/ {order[$1]=4; next}
- /^emcpioc.ko$/ {order[$1]=5; next}
+load_all_modules `cd /lib/modules/$(uname -r)/kernel/drivers/block/; ls emc* | \
+ awk '/^emcplib.ko.gz$/ {order[$1]=1; next}
+ /^emcp.ko.gz$/ {order[$1]=2; next}
+ /^emcpdm.ko.gz$/ {order[$1]=4; next}
+ /^emcpioc.ko.gz$/ {order[$1]=5; next}
/^emcp/ {order[$1]=3; next}
END { for (mod in order) print order[mod],mod;}' |\
sort -n | \