modules/external-storage: don't umount if already unmounted
This commit is contained in:
parent
1283d32691
commit
31e0a1fd83
1 changed files with 7 additions and 5 deletions
|
@ -144,11 +144,13 @@ in
|
||||||
"--compress" "none"
|
"--compress" "none"
|
||||||
] ++ commonOptions);
|
] ++ commonOptions);
|
||||||
|
|
||||||
ExecStop = lib.escapeShellArgs [
|
ExecStop = pkgs.writeShellScript "umount-s3ql-filesystem" ''
|
||||||
"${s3ql}/bin/umount.s3ql"
|
if grep -qw '${fs.mountpoint}' /proc/self/mounts; then
|
||||||
"--log" "none"
|
${s3ql}/bin/umount.s3ql --log none '${fs.mountpoint}'
|
||||||
fs.mountpoint
|
else
|
||||||
];
|
echo Filesystem already unmounted.
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
# fsck and unmounting might take a while
|
# fsck and unmounting might take a while
|
||||||
TimeoutStartSec = "6h";
|
TimeoutStartSec = "6h";
|
||||||
|
|
Loading…
Reference in a new issue