Accepting request 267272 from Base:System

- grub2-snapper-plugin.sh: cleanup grub-snapshot.cfg not referring
  to any snapshot (boo#909359) (forwarded request 267244 from michael-chang)

OBS-URL: https://build.opensuse.org/request/show/267272
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=108
This commit is contained in:
Dominique Leuenberger 2015-01-06 08:06:33 +00:00 committed by Git OBS Bridge
parent 7946dbe3c5
commit 4c4130d53e
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