5
. /usr/share/recovery-mode/l10n.sh
8
if [ ! -x /usr/bin/apt-btrfs-snapshot ]; then
12
# check if its usable, if list returns a non-zero exit code,
13
# we probably run on a system with no snapshot support
14
if ! /usr/bin/apt-btrfs-snapshot list > /dev/null 2>&1; then
18
# if we make it to this point, show some help
19
if [ "$1" = "test" ]; then
20
echo $(eval_gettext "Revert to old snapshot and reboot")
24
# get snapshots and show them in whiptail
25
snapshots=$(apt-btrfs-snapshot list | sed 1d)
27
for item in $snapshots; do
28
tag_item="$item snapshot $tag_item"
31
choice="$(whiptail --menu "$(eval_gettext "Snapshot")" 15 70 6 $tag_item \
33
# user selected cancel
34
if [ -z "$choice" ]; then
38
# set new snapshot and reboot
39
if apt-btrfs-snapshot set-default "$choice"; then