]> git.proxmox.com Git - grub2.git/blob - debian/grub-pc.postrm
send error output of rmdir /boot/grub to /dev/null
[grub2.git] / debian / grub-pc.postrm
1 #!/bin/bash -ex
2
3 case "$1" in
4 purge)
5 #debconf could be purged
6 if [ -e /usr/share/debconf/confmodule ] ; then
7 . /usr/share/debconf/confmodule
8 fi
9
10 rm -f /etc/default/grub
11
12 if which ucf >/dev/null ; then
13 ucf --purge /etc/default/grub
14 fi
15 if which ucfr >/dev/null ; then
16 ucfr --purge grub-pc /etc/default/grub
17 fi
18
19 db_input high grub-pc/purge_boot_grub || true
20 db_go || true
21 db_get grub-pc/purge_boot_grub || true
22 if [ "$RET" = "true" ] ; then
23 rm -f /boot/grub/{grub.cfg,ascii.pf2,unicode.pf2,moreblue-orbit-grub.png,*.mod,*.lst,*.img} || true
24 rmdir /boot/grub 2>/dev/null || true
25 fi
26 ;;
27 remove|upgrade|failed-upgrade|abort-upgrade|abort-install)
28 ;;
29 *)
30 echo "postrm called with unknown argument \`$1'" >&2
31 exit 1
32 ;;
33 esac
34
35 # dh_installdeb will replace this with shell code automatically
36 # generated by other debhelper scripts.
37
38 #DEBHELPER#
39
40 exit 0