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"
|
||||
] ++ commonOptions);
|
||||
|
||||
ExecStop = lib.escapeShellArgs [
|
||||
"${s3ql}/bin/umount.s3ql"
|
||||
"--log" "none"
|
||||
fs.mountpoint
|
||||
];
|
||||
ExecStop = pkgs.writeShellScript "umount-s3ql-filesystem" ''
|
||||
if grep -qw '${fs.mountpoint}' /proc/self/mounts; then
|
||||
${s3ql}/bin/umount.s3ql --log none '${fs.mountpoint}'
|
||||
else
|
||||
echo Filesystem already unmounted.
|
||||
fi
|
||||
'';
|
||||
|
||||
# fsck and unmounting might take a while
|
||||
TimeoutStartSec = "6h";
|
||||
|
|
Loading…
Reference in a new issue