summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Schrempf2017-09-05 16:59:09 +0200
committerDominik Schrempf2017-09-05 16:59:09 +0200
commit05e344be6cdeb491958197f04bbdc2e05a2507c1 (patch)
tree204033e79b5b107cf72326a6b6d2f41f0a9daf7b
downloadaur-05e344be6cdeb491958197f04bbdc2e05a2507c1.tar.gz
First commit.
- Script have been amended for Arch Linux. - Systemd services have to be provided.
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore5
-rwxr-xr-xMSUAgent62
-rwxr-xr-xMSUStart14
-rwxr-xr-xMSUWebService58
-rw-r--r--PKGBUILD46
6 files changed, 206 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..50cc205ba23b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+# Generated by mksrcinfo v8
+# Tue Sep 5 14:44:53 UTC 2017
+pkgbase = marvel-msu
+ pkgdesc = Marvell storage utility drivers and software for SATA controller 88SE9230 (e.g., HPE ProLiant MicroServer Gen10)
+ pkgver = 4.1.0.2032
+ pkgrel = 1
+ url = https://www.marvell.com/storage/system-solutions/
+ arch = x86_64
+ license = unknown
+ depends = rpmextract
+ source = https://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1857394694/v137000/Marvell_MSU_Linux_v4.1.0.2032.zip
+ source = MSUAgent
+ source = MSUStart
+ source = MSUWebService
+ md5sums = 57a924b3247d515f511531d25f2b8f1c
+ md5sums = 5c0983eb5a3b278e08dbf2afcaaa7f36
+ md5sums = 8f490aea6acffae5d91a638ebb04bf9d
+ md5sums = 1c0fa07abb17110bd9daa3e72e4d5058
+
+pkgname = marvel-msu
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f6048b060207
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/*.tar.xz
+/pkg
+/src
+/update
+/*.zip
diff --git a/MSUAgent b/MSUAgent
new file mode 100755
index 000000000000..c5076cf85e20
--- /dev/null
+++ b/MSUAgent
@@ -0,0 +1,62 @@
+#!/usr/bin/bash
+# Marvell Storage Utility Raid Event Agent.
+
+if [[ $EUID -ne 0 ]]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+RETVAL=1
+
+LD_LIBRARY_PATH=/opt/marvell/storage/apache2/lib64
+LD_LIBRARY_PATH=$LD_LIBRARYPATH:/opt/marvell/storage/expat/lib64
+LD_LIBRARY_PATH=$LD_LIBRARYPATH:/opt/marvell/storage/libxml2/lib64
+LD_LIBRARY_PATH=$LD_LIBRARYPATH:/opt/marvell/storage/openssl/lib64
+LD_LIBRARY_PATH=$LD_LIBRARYPATH:/opt/marvell/storage/php/lib64
+
+export LD_LIBRARY_PATH
+
+start()
+{
+ if lsmod | grep -Eq "^sg " &> /dev/null
+ then
+ echo "SCSI kernel module 'sg' is loaded."
+ else
+ echo "SCSI kernel module 'sg' is not loaded."
+ echo "Trying to load 'sg'."
+ if [[ $(modprobe -a sg) -ne 0 ]]
+ then
+ echo "Could not load kernel module 'sg'."
+ exit 1
+ fi
+ fi
+ echo "Starting Marvell Storage Event Agent."
+ /opt/marvell/storage/apache2/bin/mvraidsvc start
+ RETVAL=$?
+}
+
+stop()
+{
+ echo "Stopping Marvell Storage Event Agent."
+ /opt/marvell/storage/apache2/bin/mvraidsvc stop
+ RETVAL=$?
+ if [ -e /tmp/WDKMS.PID ]
+ then
+ rm -fr /tmp/WDKMS.PID
+ fi
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+esac
+
+exit $RETVAL
diff --git a/MSUStart b/MSUStart
new file mode 100755
index 000000000000..b56dabbde863
--- /dev/null
+++ b/MSUStart
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+URL="http://localhost:8845/MSU/JumpPage.php?Target=StoragePage"
+BROWSER=`which firefox`
+RETVAL=0
+
+if [ "x$BROWSER" = "x" ]
+then
+ echo
+ echo "Please install Mozilla Firefox or manually visit http://localhost:8845/."
+ echo
+else
+ $BROWSER $URL >/dev/null 2>&1 &
+fi
diff --git a/MSUWebService b/MSUWebService
new file mode 100755
index 000000000000..bb4e7645bd82
--- /dev/null
+++ b/MSUWebService
@@ -0,0 +1,58 @@
+#!/usr/bin/bash
+# Marvell Storage Utility Web Service.
+
+if [[ $EUID -ne 0 ]]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+RETVAL=1
+
+LD_LIBRARY_PATH=/opt/marvell/storage/apache2/lib64
+LD_LIBRARY_PATH=$LD_LIBRARYPATH:/opt/marvell/storage/expat/lib64
+LD_LIBRARY_PATH=$LD_LIBRARYPATH:/opt/marvell/storage/libxml2/lib64
+LD_LIBRARY_PATH=$LD_LIBRARYPATH:/opt/marvell/storage/openssl/lib64
+LD_LIBRARY_PATH=$LD_LIBRARYPATH:/opt/marvell/storage/php/lib64
+
+export LD_LIBRARY_PATH
+
+start()
+{
+ if lsmod | grep -Eq "^sg " &> /dev/null
+ then
+ echo "SCSI kernel module 'sg' is loaded."
+ else
+ echo "SCSI kernel module 'sg' is not loaded."
+ echo "Trying to load 'sg'."
+ if [[ $(modprobe -a sg) -ne 0 ]]
+ then
+ echo "Could not load kernel module 'sg'."
+ exit 1
+ fi
+ fi
+ echo "Starting Marvell Storage Utility Web Service."
+ /opt/marvell/storage/apache2/bin/apachectl start
+ RETVAL=$?
+}
+
+stop()
+{
+ echo "Stopping Marvell Storage Utility Web Service."
+ /opt/marvell/storage/apache2/bin/apachectl stop
+ RETVAL=$?
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+esac
+
+exit $RETVAL
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..853293c17737
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Dominik Schrempf <dominik dot schrempf at gmail dot com>
+pkgname=marvell-msu
+pkgver=4.1.0.2032
+pkgrel=1
+pkgdesc="Marvell storage utility drivers and software for SATA controller 88SE9230 (e.g., HPE ProLiant MicroServer Gen10)"
+arch=(x86_64)
+url="https://www.marvell.com/storage/system-solutions/"
+license=('unknown')
+groups=()
+depends=('rpmextract')
+makedepends=()
+optdepends=()
+provides=()
+conflicts=()
+replaces=()
+backup=()
+options=()
+# install=
+# changelog=
+source=("https://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1857394694/v137000/Marvell_MSU_Linux_v4.1.0.2032.zip"
+ "MSUAgent"
+ "MSUStart"
+ "MSUWebService")
+md5sums=('57a924b3247d515f511531d25f2b8f1c'
+ '5c0983eb5a3b278e08dbf2afcaaa7f36'
+ '8f490aea6acffae5d91a638ebb04bf9d'
+ '1c0fa07abb17110bd9daa3e72e4d5058')
+noextract=()
+
+build() {
+ echo "Nothing to do. Package comes prebuilt."
+}
+
+package() {
+ # Scipts.
+ install -D -m 755 MSUAgent $pkgdir/usr/bin/MSUAgent
+ install -D -m 755 MSUStart $pkgdir/usr/bin/MSUStart
+ install -D -m 755 MSUWebService $pkgdir/usr/bin/MSUWebService
+ install -D -m 644 $srcdir/etc/marvell/cli/mvcli.ini $pkgdir/etc/marvell/cli/mvcli.ini
+ install -D -m 755 $srcdir/lib64/libeventshare.so $pkgdir/usr/lib/libeventshare.so
+ install -D -m 755 $srcdir/lib64/libmvraid.so $pkgdir/usr/lib/libmvraid.so
+ # Too many files in the Marvell directory.
+ cp -r $srcdir/opt $pkgdir/
+ install -D -m 644 $srcdir/usr/share/applications/MSU.desktop $pkgdir/usr/share/applications/MSU.desktop
+ install -D -m 644 $srcdir/usr/share/applications/MSUUninstall.desktop $pkgdir/usr/share/applications/MSUUninstall.desktop
+}