Do not set hint.isp.X.role on upgrade if it is already set

(cherry picked from commit b2246a81da)
This commit is contained in:
themylogin
2022-06-13 16:16:43 +02:00
committed by Vladimir Vinogradenko
parent 93c5138b03
commit 259f079bdb

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