File: postrm

package info (click to toggle)
memtest86%2B 8.00-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,768 kB
  • sloc: ansic: 23,121; asm: 2,488; makefile: 625; sh: 408
file content (22 lines) | stat: -rw-r--r-- 634 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
set -e

if [ "$1" = remove ] || [ "$1" = purge ] ; then
	if [ -e /boot/grub/grub.cfg ] &&
	   { ! [ -x "$(command -v systemd-detect-virt 2>/dev/null)" ] ||
	     ! systemd-detect-virt --quiet --container ; } ; then
		if [ -x "$(command -v update-grub2 2>/dev/null)" ] ; then
			update-grub2 3>&-
		elif [ -x "$(command -v update-grub 2>/dev/null)" ] ; then
			update-grub 3>&-
		fi
	fi
	if [ -e /boot/efi/EFI/memtest86+/memtest86+x64.efi ] ; then
	    rm /boot/efi/EFI/memtest86+/memtest86+x64.efi
	fi
	if [ -e /boot/efi/loader/entries/memtest.conf ] ; then
	    rm /boot/efi/loader/entries/memtest.conf
	fi
fi

#DEBHELPER#