File: postinst

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

if [ "$1" = configure ]; 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/systemd/systemd-bootx64.efi ] ; then
	    mkdir -p /boot/efi/loader/entries
	    mkdir -p /boot/efi/EFI/memtest86+/
            echo "title Memtest86+  
efi /EFI/memtest86+/memtest86+x64.efi" >/boot/efi/loader/entries/memtest.conf 
	    cp /boot/memtest86+x64.efi  /boot/efi/EFI/memtest86+/memtest86+x64.efi
        fi

fi

#DEBHELPER#