fix sudo
This commit is contained in:
parent
96fad664b1
commit
612980a334
1 changed files with 8 additions and 1 deletions
|
@ -1055,7 +1055,14 @@ get_crtime() {
|
|||
|
||||
|
||||
is_btrfs_subvolume() {
|
||||
sudo btrfs subvolume show "$1" >/dev/null
|
||||
local XSUDO
|
||||
if [ $(id -u) -eq 0 ]
|
||||
then
|
||||
XSUDO=
|
||||
else
|
||||
XSUDO=sudo
|
||||
fi
|
||||
${XSUDO:+sudo} btrfs subvolume show "$1" >/dev/null
|
||||
}
|
||||
|
||||
convert_to_subvolume () {
|
||||
|
|
Loading…
Reference in a new issue