]> Sergey Matveev's repositories - nnn.git/commit
Miscellaneous improvements to nmount plugin (#1547)
author8B411 <113213448+8B411@users.noreply.github.com>
Wed, 21 Dec 2022 17:44:28 +0000 (19:44 +0200)
committerGitHub <noreply@github.com>
Wed, 21 Dec 2022 17:44:28 +0000 (23:14 +0530)
commita51437ff1626fb70a70625642e5afec7e3a491f0
tree280145f90c7e697b07f0cba90fd53b0f4e670983
parente236bd0b3a97e4ac3b4e85da08edbdad9046e3f1
Miscellaneous improvements to nmount plugin (#1547)

* plugins/nmount: keep `while` & `do` on one line for consistency

* plugins/nmount: sync only that device, which user wants to unmount

* plugins/nmount: replace all instances of `$dev` with `/dev/$dev`

* plugins/nmount: add `--no-user-interaction` option to `udisksctl`

Otherwise the user will be asked for authentication each time he wants
to unmount, say, HDD, since `udisksctl` will try to power it off.

* plugins/nmount: try to mount only existing block devices

* plugins/nmount: do not invoke `lsblk` immediately after mounting

Sometimes `lsblk` fails to provide mountpoint in such a short time frame.

* plugins/nmount: simplify pipe

* plugins/nmount: keep `echo` arguments in a single pair of quotes

* plugins/nmount: report mountpoint only if mounting was successful
plugins/nmount