summaryrefslogtreecommitdiff
path: root/libre/grub/grub.install
diff options
context:
space:
mode:
Diffstat (limited to 'libre/grub/grub.install')
-rw-r--r--libre/grub/grub.install27
1 files changed, 20 insertions, 7 deletions
diff --git a/libre/grub/grub.install b/libre/grub/grub.install
index c1f077d59..9188b357a 100644
--- a/libre/grub/grub.install
+++ b/libre/grub/grub.install
@@ -1,20 +1,33 @@
-infodir=/usr/share/info
-filelist=(grub.info multiboot.info)
+infodir="usr/share/info"
+filelist=('grub.info' 'grub-dev.info')
post_install() {
- [ -x usr/bin/install-info ] || return 0
+ 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
+ install-info ${infodir}/${file}.gz ${infodir}/dir 2> /dev/null
done
}
post_upgrade() {
- post_install $1
+ for file in ${filelist[@]}; do
+ install-info ${infodir}/${file}.gz ${infodir}/dir 2> /dev/null
+ done
}
pre_remove() {
- [ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
- install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ install-info --delete ${infodir}/${file} ${infodir}/dir 2> /dev/null
done
}