Sophie

Sophie

distrib > Mageia > 3 > x86_64 > by-pkgid > 11cd120f4ac9aaa359f33c69c6a4086c > scriptlet

grub2-2.00-41.mga3.x86_64.rpm

PREUN

/bin/sh
exec > /var/log/grub2_preun.log 2>&1
# Only if uninstalling
if [ $1 -eq 0 ]; then
rm -rf /boot/grub2/i386-pc
rm -rf /boot/grub2/locale
fi

POSTIN

/bin/sh
exec > /var/log/grub2_post.log 2>&1
# Determine the partition with /boot
BOOT_PARTITION=$(df -h /boot |(read; awk '{print $1; exit}'))

# Generate core.img, but don't let it be installed in boot sector
grub2-install --directory=/usr/lib/grub/i386-pc --grub-setup=/bin/true $BOOT_PARTITION

# Generate grub.cfg only on install
if [ $1 -eq 1 ]; then
    grub2-mkconfig -o /boot/grub2/grub.cfg
fi