mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 21:43:29 +01:00
types swap: check real path of the device before mount
This commit is contained in:
1 parent
96815862d8
commit
c77e66cea1
1 file changed
+1
-1
+1
-1
@@ -42,7 +42,7 @@
|
|||||||
inherit config options;
|
inherit config options;
|
||||||
default = {
|
default = {
|
||||||
fs.${config.device} = ''
|
fs.${config.device} = ''
|
||||||
if ! swapon --show | grep -q '^${config.device} '; then
|
if ! swapon --show | grep -q "^$(readlink -f ${config.device}) "; then
|
||||||
swapon ${config.device}
|
swapon ${config.device}
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in new issue
Block a user