diff options
Diffstat (limited to 'remote/rootfs/rootfs-stage32/data')
-rwxr-xr-x | remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions index c3813af9..6a353b8f 100755 --- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions +++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions @@ -118,16 +118,19 @@ get_all_with_id () { # Check for standard swap partitions and make them available to the system HAVE_SWAP=no -for PART_DEV in $(get_all_with_id 82); do - echo -e "$PART_DEV\tswap\t\tswap\t\tdefaults\t 0 0" >> "/etc/fstab" - swapon "$PART_DEV" -p 10 && HAVE_SWAP=yes # low priority, in case we have zram swap, prefer that) +for PART_DEV in $(get_all_with_id 82) '/dev/disk/by-partlabel/Linux\x20swap'; do + [ -e "$PART_DEV" ] || continue # Since Linux\x20swap is hard-coded and might not exist + if swapon "$PART_DEV" -p 10; then + HAVE_SWAP=yes # low priority, in case we have zram swap, prefer that) + echo -e "$PART_DEV\tswap\t\tswap\t\tdefaults\t 0 0" >> "/etc/fstab" + fi done # We use special non assigned partition type (id44) for harddisk scratch # space, thus no normal filesystem will be incidentally deleted or # corrupted HAVE_TEMP=no -for PART_DEV in $(get_all_with_id 44) "/dev/disk/by-partlabel/OpenSLX-ID44"; do +for PART_DEV in $(get_all_with_id 44) '/dev/disk/by-partlabel/OpenSLX-ID44'; do [ -e "$PART_DEV" ] || continue # Since OpenSLX-ID44 is hard-coded and might not exist # check for supported filesystem and formatter if format_disk "$PART_DEV"; then |