summaryrefslogtreecommitdiffstats
path: root/abs/core/grub/grub.install
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-07 02:30:28 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-07 02:30:28 (GMT)
commite39a88ed81cbb4f4ddb9f1de4d0497ff7db908d7 (patch)
treeea68401bfcf5559fa6bcc9516e3000628ca9daac /abs/core/grub/grub.install
parent401b6463c60a1d979301e882343855eedf8dd14c (diff)
downloadlinhes_pkgbuild-e39a88ed81cbb4f4ddb9f1de4d0497ff7db908d7.zip
linhes_pkgbuild-e39a88ed81cbb4f4ddb9f1de4d0497ff7db908d7.tar.gz
linhes_pkgbuild-e39a88ed81cbb4f4ddb9f1de4d0497ff7db908d7.tar.bz2
grub 2
-drops grub 1 and replaced with grub2
Diffstat (limited to 'abs/core/grub/grub.install')
-rw-r--r--abs/core/grub/grub.install33
1 files changed, 22 insertions, 11 deletions
diff --git a/abs/core/grub/grub.install b/abs/core/grub/grub.install
index bf52382..9188b35 100644
--- a/abs/core/grub/grub.install
+++ b/abs/core/grub/grub.install
@@ -1,22 +1,33 @@
-info_dir=/usr/share/info
-info_files=(grub.info multiboot.info)
+infodir="usr/share/info"
+filelist=('grub.info' 'grub-dev.info')
post_install() {
- for f in ${info_files[@]}; do
- install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ 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() {
- post_install
+ for file in ${filelist[@]}; do
+ install-info ${infodir}/${file}.gz ${infodir}/dir 2> /dev/null
+ done
}
pre_remove() {
- for f in ${info_files[@]}; do
- install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ for file in ${filelist[@]}; do
+ install-info --delete ${infodir}/${file} ${infodir}/dir 2> /dev/null
done
}
-
-
-
-