SHA256
1
0
forked from pool/grub2

Accepting request 267244 from home:michael-chang:boo909359

- grub2-snapper-plugin.sh: cleanup grub-snapshot.cfg not referring
  to any snapshot (boo#909359)

OBS-URL: https://build.opensuse.org/request/show/267244
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=137
This commit is contained in:
Andrei Borzenkov 2015-01-05 12:39:23 +00:00 committed by Git OBS Bridge
parent 7e92957877
commit cad906de1c
2 changed files with 15 additions and 1 deletions

View File

@ -104,12 +104,20 @@ snapper_snapshots_cfg_refresh () {
snapshot="${s_dir}/snapshot"
# list only read-only snapshot (bnc#878528)
if [ -w "$snapshot" ]; then
if [ ! -d ${s_dir} -o -w "$snapshot" ]; then
continue
fi
if [ -r "${s_dir}/info.xml" -a -r "${s_dir}/snapshot/boot/grub2/grub.cfg" ]; then
cs="${s_dir}
${cs}"
else
# cleanup any grub-snapshot.cfg without associated snapshot info
snapper_cfg="${s_dir}/${snapshot_submenu_name}"
if [ -f "$snapper_cfg" ]; then
rm -f "$snapper_cfg"
rmdir "$s_dir" 2>/dev/null || true
fi
continue
fi
done

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Dec 25 08:52:12 UTC 2014 - mchang@suse.com
- grub2-snapper-plugin.sh: cleanup grub-snapshot.cfg not referring
to any snapshot (boo#909359)
-------------------------------------------------------------------
Thu Dec 25 08:34:49 UTC 2014 - mpluskal@suse.com