From 64cf361dd1f757ccc31ced3482efe88c7aaaccc5 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Thu, 28 Jun 2012 21:32:10 -0300 Subject: grub-2.00-1: new package --- libre-testing/grub/grub.install | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 libre-testing/grub/grub.install (limited to 'libre-testing/grub/grub.install') diff --git a/libre-testing/grub/grub.install b/libre-testing/grub/grub.install new file mode 100644 index 000000000..9188b357a --- /dev/null +++ b/libre-testing/grub/grub.install @@ -0,0 +1,33 @@ +infodir="usr/share/info" +filelist=('grub.info' 'grub-dev.info') + +post_install() { + if [ -f /boot/grub/grub.cfg.pacsave ]; then + echo "Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg" + install -D -m0644 /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg + fi + + cat << 'EOM' +Generating grub.cfg.example config file... +This may fail on some machines running a custom kernel. +EOM + + grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null + echo "done." + + for file in ${filelist[@]}; do + install-info ${infodir}/${file}.gz ${infodir}/dir 2> /dev/null + done +} + +post_upgrade() { + for file in ${filelist[@]}; do + install-info ${infodir}/${file}.gz ${infodir}/dir 2> /dev/null + done +} + +pre_remove() { + for file in ${filelist[@]}; do + install-info --delete ${infodir}/${file} ${infodir}/dir 2> /dev/null + done +} -- cgit v1.2.3