NAS-113750 / 22.12 / Merge pull request #294 from truenas/NAS-113750

NAS-113750 / 22.12 / Do not set `hint.isp.X.role` on upgrade if it is already set
This commit is contained in:
Rick Mesta
2022-06-15 13:10:35 -05:00
committed by GitHub

View File

@@ -31,7 +31,11 @@ post-install =
if ! dmidecode -s system-product-name | egrep "^(FREE|TRUE)NAS" > /dev/null; then
for i in `seq 0 3`; do
echo "hint.isp.$i.role=2" >> /boot/loader.conf.local
file=/boot/loader.conf.local
name="hint.isp.$i.role"
if ! cat "$file" | grep -q "$name"; then
echo "$name=2" >> $file
fi
done
fi