Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates > by-pkgid > a5b7c5948ff4413bf44a7c42d0190feb > scriptlet

grub2-mageia-theme-2.02-0.git9752.18.2.mga5.noarch.rpm

POSTIN

/bin/sh
# Don't install if updating
if [ $1 -eq 1 ] ; then
# Remove trailing blank lines from /etc/default/grub
sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' /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 theme
echo "GRUB_THEME=/boot/grub2/themes/maggy/theme.txt" >> /etc/default/grub
fi

POSTUN

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