summaryrefslogtreecommitdiff
path: root/hpssacli-2.40-13.0_amd64.sh
blob: 9255684c9ecca95f6ccfa19983d4738fbd6b95b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# Thanks to rmp5s on unraid.net for the solution.
# Thanks to Daggr for confirming the solution.
# https://forums.unraid.net/topic/82007-solved-unraid-with-hp-p420i-raid-card-in-hp-proliant-dl380p-g8/

#deb=hpssacli-2.40-13.0_amd64.deb
deb=${0%.sh}.deb
url=https://downloads.linux.hpe.com/SDR/repo/mcp/pool/non-free/$deb
set -ex

if ! dpkg-query -W hpssacli
then
	[ -e "$deb" ] || wget "$url" || curl -O "$url"
	dpkg -i "$deb"
fi

PATH=/opt/hp/hpssacli/bld:$PATH

hpssacli controller slot=0 show |
	grep 'HBA Mode Enabled: True' ||
	hpssacli controller slot=0 modify hbamode=on
hpssacli rescan