mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-12-31 21:21:56 +00:00
small fix for usage of findmnt --raw flag
This commit is contained in:
parent
3593721967
commit
3f107f9d31
10
tomb
10
tomb
@ -548,7 +548,7 @@ is_valid_tomb() {
|
||||
_plot $1 # Set TOMB{PATH,DIR,FILE,NAME}
|
||||
|
||||
# Tomb already mounted (or we cannot alter it)
|
||||
[[ "`_sudo findmnt -lrvo SOURCE,TARGET,FSTYPE,OPTIONS,LABEL |
|
||||
[[ "`_sudo findmnt -rvo SOURCE,TARGET,FSTYPE,OPTIONS,LABEL |
|
||||
awk -vtomb="[$TOMBNAME]" '
|
||||
/^\/dev\/mapper\/tomb/ { if($5==tomb) print $1 }'`" = "" ]] || {
|
||||
_failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME
|
||||
@ -2263,7 +2263,7 @@ awk "/mapper/"' { print $2 ";" $3 ";" $4 ";" $5 }'`
|
||||
list_tomb_mounts() {
|
||||
[[ -z "$1" ]] && {
|
||||
# list all open tombs
|
||||
_sudo findmnt -lrvo SOURCE,TARGET,FSTYPE,OPTIONS,LABEL \
|
||||
_sudo findmnt -rvo SOURCE,TARGET,FSTYPE,OPTIONS,LABEL \
|
||||
| awk '
|
||||
BEGIN { main="" }
|
||||
/^\/dev\/mapper\/tomb/ {
|
||||
@ -2274,7 +2274,7 @@ BEGIN { main="" }
|
||||
'
|
||||
} || {
|
||||
# list a specific tomb
|
||||
_sudo findmnt -lrvo SOURCE,TARGET,FSTYPE,OPTIONS,LABEL \
|
||||
_sudo findmnt -rvo SOURCE,TARGET,FSTYPE,OPTIONS,LABEL \
|
||||
| awk -vtomb="[$1]" '
|
||||
BEGIN { main="" }
|
||||
/^\/dev\/mapper\/tomb/ {
|
||||
@ -2302,7 +2302,7 @@ list_tomb_binds() {
|
||||
|
||||
# note that this code assumes that the tomb name is provided in square brackets
|
||||
|
||||
_sudo findmnt -lro SOURCE,TARGET,FSTYPE,OPTIONS,LABEL \
|
||||
_sudo findmnt -ro SOURCE,TARGET,FSTYPE,OPTIONS,LABEL \
|
||||
| grep -F "/dev/mapper/tomb" \
|
||||
| awk -vpattern="$1" '
|
||||
BEGIN { }
|
||||
@ -2501,7 +2501,7 @@ resize_tomb() {
|
||||
_load_key # Try loading new key from option -k and set TOMBKEYFILE
|
||||
|
||||
local oldtombsize=$(( `stat -c %s "$TOMBPATH" 2>/dev/null` / 1048576 ))
|
||||
local mounted_tomb=`_sudo findmnt -lrvo SOURCE,TARGET,FSTYPE,OPTIONS,LABEL |
|
||||
local mounted_tomb=`_sudo findmnt -rvo SOURCE,TARGET,FSTYPE,OPTIONS,LABEL |
|
||||
awk -vtomb="[$TOMBNAME]" '/^\/dev\/mapper\/tomb/ { if($5==tomb) print $1 }'`
|
||||
|
||||
# Tomb must not be open
|
||||
|
Loading…
Reference in New Issue
Block a user