setup-nasbeery aktualisiert

This commit is contained in:
2026-01-01 14:05:00 +01:00
parent 19a29ae5d9
commit 80a9caaf70
+5 -6
View File
@@ -141,12 +141,11 @@ modprobe zfs
echo "Update time via ntp" echo "Update time via ntp"
ntpdate-debian -b > /dev/null ntpdate-debian -b > /dev/null
rootfs=$(grep " / " /proc/mounts | cut -d'/' -f3) echo "Detecting root disk (SAFETY CHECK)"
if [[ "$rootfs" == *"nvme"* ]] || [[ "$rootfs" == *"mmcblk"* ]]; then rootdisk=$(findmnt -n -o SOURCE / | sed 's/[0-9]*$//;s/p$//')
rootdisk=${rootfs::-3} rootdisk=$(basename "$rootdisk")
else
rootdisk=${rootfs::1} echo "Root disk detected as: /dev/$rootdisk"
fi
zdisks=$(echo $(lsblk -nd -I 8,259,179 -o name | grep -v ${rootdisk}) | cut -d' ' -f1-2) zdisks=$(echo $(lsblk -nd -I 8,259,179 -o name | grep -v ${rootdisk}) | cut -d' ' -f1-2)
case $FORMAT in case $FORMAT in