#!/bin/sh [ "$(id -u)" = 0 ] || exec sudo -- $0 "$@" 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 install_deb_url() { local url="$1" deb pkg deb=${url##*/} pkg=${deb%%-*} if ! status=$(dpkg-query -W -f '${Status}' "$pkg") || ! [ "$status" = 'install ok installed' ] then [ -e "$deb" ] || wget -c "$url" || curl -O "$url" dpkg -i "$deb" fi } set -e install_deb_url "$url" 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 # Thanks to rmp5s on unraid.net for the solution & link. # 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/