mirror of
https://github.com/nix-community/disko.git
synced 2024-09-17 09:37:17 +03:00
lib.mount.filesystem: don't mount if already mounted
This commit is contained in:
parent
348d4f164f
commit
107a37f527
@ -82,8 +82,10 @@ let {
|
|||||||
|
|
||||||
mount.filesystem = q: x: {
|
mount.filesystem = q: x: {
|
||||||
fs.${x.mountpoint} = ''
|
fs.${x.mountpoint} = ''
|
||||||
|
if ! [ "$(mount | sed -n 's:\([^ ]\+\) on ${x.mountpoint} .*:\1:p')" = ${q.device} ]; then
|
||||||
mkdir -p ${x.mountpoint}
|
mkdir -p ${x.mountpoint}
|
||||||
mount ${q.device} ${x.mountpoint}
|
mount ${q.device} ${x.mountpoint}
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user