5
. /lib/recovery-mode/l10n.sh
7
if [ "$READONLY" = "true" ]; then
12
if [ ! -x /usr/bin/apt-btrfs-snapshot ]; then
16
# check if its usable, if list returns a non-zero exit code,
17
# we probably run on a system with no snapshot support
18
if ! /usr/bin/apt-btrfs-snapshot list > /dev/null 2>&1; then
22
# if we make it to this point, show some help
23
if [ "$1" = "test" ]; then
24
echo $(eval_gettext "Revert to old snapshot and reboot")
28
# get snapshots and show them in whiptail
29
snapshots=$(apt-btrfs-snapshot list | sed 1d)
31
for item in $snapshots; do
32
tag_item="$item snapshot $tag_item"
35
choice="$(whiptail --menu "$(eval_gettext "Snapshot")" 15 70 6 $tag_item \
37
# user selected cancel
38
if [ -z "$choice" ]; then
42
# set new snapshot and reboot
43
if apt-btrfs-snapshot set-default "$choice"; then