Sophie

Sophie

distrib > Mageia > cauldron > i586 > media > core-release > by-pkgid > d7c38c1ad55661b2a5d0faf7aef1834e > scriptlet

grub2-mageia-theme-dejavu-1.0-12.mga9.noarch.rpm

POSTIN

/bin/sh
if [ $1 -eq 1 ] ; then
# Check for other themes and remove them
sed -i '/GRUB_THEME=\/boot\/grub2/d' /etc/default/grub

# Check that /etc/default/grub ends in a linefeed
[ "$(tail -n 1 /etc/default/grub | wc --lines)" = "1" ] || echo >> /etc/default/grub

# Add dejavu theme
echo "GRUB_THEME=/boot/grub2/themes/mageia-dejavu/theme.txt" >> /etc/default/grub

# Copy system default background at correct aspect ratio to grub2 default theme
if [ -h /usr/share/mga/backgrounds/default.png ]; then
cp -f /usr/share/mga/backgrounds/default.png /boot/grub2/themes/grub2-mageia-default.png
fi

# Update menu on install
grub2-mkconfig -o /boot/grub2/grub.cfg && rm -f /boot/grub2/grub.cfg.rpmsave
fi

# Fix upgrade from Mageia5

POSTUN

/bin/sh
exec > /var/log/grub2_theme_postun.log 2>&1
# Only if uninstalling dejavu theme
if [ $1 -eq 0 ]; then
# Remove dejavu theme from config
sed -i '/GRUB_THEME=\/boot\/grub2\/themes\/mageia-dejavu\/theme.txt/d' /etc/default/grub
fi

Triggers

grub2-mageia5-theme-dejavu < 1.0-2.mga5

/bin/sh
# Run install.sh to replace /boot/grub2/fonts/unicode.pf2
   if [ -f /boot/grub2/install.sh -a -x /usr/sbin/detectloader ] && [ "$DURING_INSTALL" != "1" ]; then
		LOADER=$(/usr/sbin/detectloader)
		[ "$LOADER" = "GRUB2" ] && /boot/grub2/install.sh ||:
   fi