POSTIN
/bin/sh
if [ -f /boot/grub/install.sh ]; then
if [ -x /usr/sbin/detectloader ]; then
LOADER=$(/usr/sbin/detectloader)
if [ "$LOADER" = "GRUB" ]; then
for file in /lib/grub/i386-mageia/*stage*; do
cp -f $file /boot/grub/ || :
done
sh /boot/grub/install.sh > /dev/null
fi
fi
fi
Triggers
grub <=
0.97-1
/bin/sh
# What a hack hell... we need this things because of upgrading from
# previous grub versions. The problem is that previous grub packages
# remove the stage files from /boot/grub in some cases, making the
# system unbootable.
mkdir -p /boot/grub/backup_stagefiles
mv /boot/grub/*stage* /boot/grub/backup_stagefiles/ >/dev/null 2>&1 || :
# Replicate post script code here, because the trigger scripts are
# executed only after post script of this new package, and old
# install.sh was used then. So we need to execute again to use the new
# generated install.sh script.
if [ -f /boot/grub/install.sh ]; then
if [ -x /usr/sbin/detectloader ]; then
LOADER=$(/usr/sbin/detectloader)
if [ "$LOADER" = "GRUB" ]; then
for file in /lib/grub/i386-mageia/*stage*; do
cp -f $file /boot/grub/ || :
done
sh /boot/grub/install.sh > /dev/null
fi
fi
fi
grub <=
0.97-1
/bin/sh
if [ -d /boot/grub/backup_stagefiles ]; then
for file in /boot/grub/backup_stagefiles/*stage*; do
if [ ! -f "/boot/grub/`basename $file`" ]; then
mv $file /boot/grub/ || :
else
rm -f $file;
fi
done
rmdir /boot/grub/backup_stagefiles > /dev/null || :
fi