mirror of
https://github.com/nix-community/disko.git
synced 2026-12-03 06:23:28 +01:00
lib.mount.filesystem: don't mount if already mounted
This commit is contained in:
1 parent
348d4f164f
commit
107a37f527
1 file changed
+4
-2
+4
-2
@@ -82,8 +82,10 @@ let {
|
|||||||
|
|
||||||
mount.filesystem = q: x: {
|
mount.filesystem = q: x: {
|
||||||
fs.${x.mountpoint} = ''
|
fs.${x.mountpoint} = ''
|
||||||
mkdir -p ${x.mountpoint}
|
if ! [ "$(mount | sed -n 's:\([^ ]\+\) on ${x.mountpoint} .*:\1:p')" = ${q.device} ]; then
|
||||||
mount ${q.device} ${x.mountpoint}
|
mkdir -p ${x.mountpoint}
|
||||||
|
mount ${q.device} ${x.mountpoint}
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user