Simplified the pipeline which obtains the partition device files
This commit is contained in:
parent
e226486172
commit
c0b650bebb
@ -519,8 +519,9 @@ list_devices() {
|
|||||||
|
|
||||||
## Puts list of mounted (sub-)devices of $1 into $mounted_devs
|
## Puts list of mounted (sub-)devices of $1 into $mounted_devs
|
||||||
list_mounted_of() {
|
list_mounted_of() {
|
||||||
partitions=$("$lsblk_cmd" -n -p -o NAME /dev/"$1" | grep -v '^'/dev/"$1"'$' \
|
partitions=$("$lsblk_cmd" -l -n -p -o NAME /dev/"$1" \
|
||||||
| sed -e 's/[^a-zA-Z0-9_+@:.,/-]//g' | tr '\n\r' ' ')
|
| grep -v '^'/dev/"$1"'$' \
|
||||||
|
| tr '\n\r' ' ')
|
||||||
mounted_devs=
|
mounted_devs=
|
||||||
for i in /dev/"$1" $partitions
|
for i in /dev/"$1" $partitions
|
||||||
do
|
do
|
||||||
|
Loading…
Reference in New Issue
Block a user