diff options
author | Jonathan Bauer | 2020-05-07 11:15:28 +0200 |
---|---|---|
committer | Jonathan Bauer | 2020-05-07 11:16:36 +0200 |
commit | 964f40e1b29e35e5f2970d51a5c675a824606f15 (patch) | |
tree | be3f50b055a796cb003c111f5abbdd01ed3ac66f /builder/modules.d/slx-dmsetup/scripts/generate-fstab-persistent.sh | |
parent | [dnbd3-rootfs] default to xmount for qcow2 (diff) | |
download | systemd-init-964f40e1b29e35e5f2970d51a5c675a824606f15.tar.gz systemd-init-964f40e1b29e35e5f2970d51a5c675a824606f15.tar.xz systemd-init-964f40e1b29e35e5f2970d51a5c675a824606f15.zip |
[slx-dmsetup] remove deprecated scripts
* get-partitions-by-id is now provided by slx-tools
* persistent partition needs to be handled separately and was not used
anyways
Diffstat (limited to 'builder/modules.d/slx-dmsetup/scripts/generate-fstab-persistent.sh')
-rw-r--r-- | builder/modules.d/slx-dmsetup/scripts/generate-fstab-persistent.sh | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/builder/modules.d/slx-dmsetup/scripts/generate-fstab-persistent.sh b/builder/modules.d/slx-dmsetup/scripts/generate-fstab-persistent.sh deleted file mode 100644 index 5c6f2b82..00000000 --- a/builder/modules.d/slx-dmsetup/scripts/generate-fstab-persistent.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash -# -# Hook to generate stage4's fstab entries for persistent partitions -# -# Persistent identifiers (MBR types, GPT partition labels) -# are expected to be specified in the OpenSLX config -# as 'SLX_PERSISTENT_DEVICE_IDENTIFIER' and their filesystem -# as 'SLX_PERSISTENT_DEVICE_FILESYSTEM', e.g ext4 or xfs. -# If not specified, will default to 'auto' but will not -# active systemd's features 'x-systemd.makefs' and 'x-systemd.growfs' - -. /etc/openslx - -type -p emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh - -# NOTE: systemd makes the mount point path automatically. -# if multiple exists, take the biggest one (first in the list) -if [ -n "$SLX_PERSISTENT_DEVICE_IDENTIFIER" ]; then - declare -a persistent_dev_list - for persistent_dev in \ - $(get-partitions-by-id ${SLX_PERSISTENT_DEVICE_IDENTIFIER//,/ /}); do - [ -z "$persistent_dev" ] && continue - persistent_dev_list+=("$persistent_dev") - done - if [ "${#persistent_dev[@]}" -gt 0 ]; then - if [ "${#persistent_dev[@]}" -gt 1 ]; then - warn "$0: More than one persistent device found." - warn "$0: Will use the biggest one: ${persistent_dev[0]}" - fi - persistent_dev_systemd_name="$( tr '/' '-' <<< ${persistent_dev[0]:1})" - persistent_mount_opts="nofail" - if [ -n "$SLX_PERSISTENT_DEVICE_FILESYSTEM" ]; then - #persistent_mount_opts+=",x-systemd.requires=ensure-fs@${persistent_dev_systemd_name}" - persistent_mount_opts+=",x-systemd.after=ensure-fs@${persistent_dev_systemd_name}" - fi - ( - echo -ne "${persistent_dev[0]}\t" - echo -ne "${SLX_PERSISTENT_DEVICE_MOUNT_POINT:-/opt/openslx/persistent}\t" - echo -ne "${SLX_PERSISTENT_DEVICE_FILESYSTEM:-auto}\t" - echo -ne "${persistent_mount_opts}\t0\t2" - ) >> "$NEWROOT/etc/fstab" - - # drop-in to create filesystem if needed and - #persistent_dev_systemd_name="$( tr '/' '-' <<< ${persistent_dev[0]:1})" - #mkdir -p "$NEWROOT/etc/systemd/system/${persistent_dev_systemd_name}" - #cat <<- EOF > "$NEWROOT" - #EOF - else - warn "$0: No device with ID '$SLX_PERSISTENT_DEVICE_IDENTIFIER' found." - fi -fi -true |