mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-10-20 02:42:03 +08:00
add --no-dbus option to snapper list (#75)
In a chroot-ed environment, it is necessary to run snapper without dbus.
This commit is contained in:
+3
-3
@@ -239,11 +239,11 @@ snapshot_list()
|
|||||||
# Query info from snapper if it is installed
|
# Query info from snapper if it is installed
|
||||||
type snapper >/dev/null 2>&1
|
type snapper >/dev/null 2>&1
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
local snapper_ids=($(snapper -t 0 -c "$snapper_config" list | tail -n +3 | cut -d'|' -f 1))
|
local snapper_ids=($(snapper --no-dbus -t 0 -c "$snapper_config" list | tail -n +3 | cut -d'|' -f 1))
|
||||||
local snapper_types=($(snapper -t 0 -c "$snapper_config" list | tail -n +3 | cut -d'|' -f 2))
|
local snapper_types=($(snapper --no-dbus -t 0 -c "$snapper_config" list | tail -n +3 | cut -d'|' -f 2))
|
||||||
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
local snapper_descriptions=($(snapper -t 0 -c "$snapper_config" list | tail -n +3 | rev | cut -d'|' -f 2 | rev))
|
local snapper_descriptions=($(snapper --no-dbus -t 0 -c "$snapper_config" list | tail -n +3 | rev | cut -d'|' -f 2 | rev))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user