Sophie

Sophie

distrib > Mageia > 3 > i586 > by-pkgid > b54b614d2cfee6426e6ff3e202986e7f > scriptlet

grub2-mageia-theme-2.00-41.mga3.i586.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 if not commented
sed -i '/^[[:space:]]*#/!s/GRUB_THEME=\/boot\/grub2\/themes\/maggy\/theme.txt//g' /etc/default/grub
# Remove maggy dir
rm -rf /boot/grub2/themes/maggy
fi