confz

git mirror of https://ccx.te2000.cz/bzr/confz
git clone https://ccx.te2000.cz/git/confz
Log | Files | Refs

commit f9fcde5e2f85e20c42633abd22f50458b9966530
parent 173f991d29789451d13ce12d2993e033190b2355
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Wed,  9 Dec 2015 16:42:57 +0100

add mkfs_opts to allow tuning the mkfs parameters
Diffstat:
Mzsh-functions/confz_fs_init | 6++++--
Mzsh-functions/confz_vserver_init | 2+-
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/zsh-functions/confz_fs_init b/zsh-functions/confz_fs_init @@ -447,12 +447,14 @@ confz_filesystem_check() { die "$0: DEFAULT_FS is unset and no 'filesystem' was passed" checkvars label device filesystem + defvar mkfs_opts '' [[ -b ${vars[device]} ]] || \ die "$0: not a block device: ${(qqq)vars[device]}" do_command=( - mkfs -t ${vars[filesystem]} -L ${vars[label]} ${vars[device]} + mkfs -t ${vars[filesystem]} -L ${vars[label]} ${(z)vars[mkfs_opts]} + ${vars[device]} ) local tries blk_out DEVNAME LABEL UUID TYPE SEC_TYPE PARTLABEL PARTUUID @@ -556,7 +558,7 @@ confz_mounted_volume_check() { defvar label $vars[lv_name] require logical_volume %device \?vg_name :size :lv_name - require filesystem :device :label :filesystem + require filesystem :device :label :filesystem \?mkfs_opts require fstab :device :mountpoint :filesystem \?opts \?dump \?pass require mounted :device :mountpoint diff --git a/zsh-functions/confz_vserver_init b/zsh-functions/confz_vserver_init @@ -65,7 +65,7 @@ confz_vserver_check() { die "${vars[etcdir]}/vdir is not symlink or missing" fi - require mounted_volume :size \?filesystem \ + require mounted_volume :size \?filesystem \?mkfs_opts \ lv_name=vs_$vars[name] \ label=${${vars[name]}[0,12]} \ mountpoint=$vars[vdir]