summaryrefslogtreecommitdiff
path: root/libre-testing/grub/grub.install
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-07-07 13:09:53 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-07-07 13:09:53 -0400
commit44fb7936931db66f6ba7c46f73ebb29d2725fe58 (patch)
tree0be1bc01e36b6aea80bbae6a00f7cee123a162c3 /libre-testing/grub/grub.install
parentde83d1a9287e1d73029b1202069e3cefae26bb31 (diff)
parent108181f9a57602fd8d527dafb3b46fc0b59711df (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'libre-testing/grub/grub.install')
-rw-r--r--libre-testing/grub/grub.install33
1 files changed, 33 insertions, 0 deletions
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
+}