diff options
Diffstat (limited to 'core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions')
-rwxr-xr-x | core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions b/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions index 6a353b8f..d4042926 100755 --- a/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions +++ b/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions @@ -42,7 +42,7 @@ format_disk () { if which "mkfs.$fs" ; then case "$fs" in xfs) - fopt="-f -b size=4k -s size=4k -l size=512b" # fastest formatting possible :) + fopt="-f -b size=4k -s size=4k" # fastest formatting possible :) MOUNT_OPTIONS_SET_BY_FORMAT_DISK="-o noexec" ;; ext2) @@ -152,7 +152,7 @@ for PART_DEV in $(get_all_with_id 83); do done # special partition 45 (persistent scratch) to $MOUNT_POINT_45 -for PART_DEV in $(get_all_with_id 45); do +for PART_DEV in $(get_all_with_id 45) '/dev/disk/by-partlabel/OpenSLX-ID45'; do mkdir -p "$MOUNT_POINT_45" if ! mount -t auto -o noexec "${PART_DEV}" "$MOUNT_POINT_45"; then format_disk "$PART_DEV" "ext4 xfs jfs ext3" || continue @@ -171,7 +171,11 @@ for PART_DEV in $(get_all_with_id 46); do # ln -sf /media/${PART_DEV#/dev/*} /var/home echo -e "${PART_DEV}\t/media/${PART_DEV#/dev/*}\tauto\t\tnoauto\t\t 0 0" >> "/etc/fstab" done -if [ "$HAVE_PARTITION_45" = "no" ] && [ -d "$MOUNT_POINT_45" ]; then +if [ "$HAVE_PARTITION_45" = "yes" ]; then + mkdir -p "$MOUNT_POINT_45/data" + chown root:root "$MOUNT_POINT_45" "$MOUNT_POINT_45/data" + chmod a+rwxt "$MOUNT_POINT_45/data" +elif [ -d "$MOUNT_POINT_45" ]; then rm -f -- "$MOUNT_POINT_45" fi |