Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 45394ca8402d721b8a2b2ba5785a8925 > scriptlet

grub2-mageia-theme-2.00-58.mga4.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