From ee7849be8f899d85efcb15e3941b35cc13de7a7c Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Thu, 27 Jul 2023 16:29:06 +0200 Subject: [PATCH] Add fs type as option --- install.sh | 1 + mounts.conf.template | 1 + template.mount | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 641d4a4..795dfb1 100755 --- a/install.sh +++ b/install.sh @@ -24,6 +24,7 @@ for f in $run_directory/mounts.conf.d/*.conf; do $sudo cp $run_directory/template.mount /etc/systemd/system/$mountfile $sudo sed -i -e "s/PH_MAPPER/${mount[mapper]}/g" /etc/systemd/system/$mountfile $sudo sed -i -e "s:PH_TARGET:${mount[target]}:g" /etc/systemd/system/$mountfile + $sudo sed -i -e "s:PH_FSTYPE:${mount[type]}:g" /etc/systemd/system/$mountfile if [ "${mount[friendly]}" != '' ]; then $sudo sed -i -e "s/PH_FRIENDLY/${mount[friendly]}/g" /etc/systemd/system/$mountfile else diff --git a/mounts.conf.template b/mounts.conf.template index 3d0dbf2..b970293 100644 --- a/mounts.conf.template +++ b/mounts.conf.template @@ -5,6 +5,7 @@ declare -A mount mount[mapper]='' # As in /dev/mapper/ mount[target]='' # Mount point (absolute path) +mount[type]='ext4' # Filesystem type mount[friendly]='' # Optional friendly name for unit file Description mount[autolock]=0 # Set to 1 to enable autolock mount[timeout]=0 # Set to 1 to enable mount timeout (30 seconds) diff --git a/template.mount b/template.mount index c0c9353..8a8a50e 100644 --- a/template.mount +++ b/template.mount @@ -1,10 +1,10 @@ [Unit] Description=Mount PH_FRIENDLY Volume -# Below Requisite could be a Wants -Requisite=systemd-cryptsetup@PH_MAPPER.service +Wants=systemd-cryptsetup@PH_MAPPER.service After=systemd-cryptsetup@PH_MAPPER.service [Mount] What=/dev/mapper/PH_MAPPER Where=PH_TARGET +Type=PH_FSTYPE Options=rw,relatime