summaryrefslogtreecommitdiff
path: root/libre/grub/grub2.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@lavabit.com>2012-08-27 00:15:51 -0300
committerAndré Fabian Silva Delgado <emulatorman@lavabit.com>2012-08-27 00:15:51 -0300
commit43a5bcc4818d2b06b0dbc8f53c9b9c26150e7dc6 (patch)
tree5178fe6d32627d77375f7651dd06b06d6acf06eb /libre/grub/grub2.install
parentff0f66c534f9f5d0c042c3eaf48bd7e52d94fa34 (diff)
downloadabslibre-43a5bcc4818d2b06b0dbc8f53c9b9c26150e7dc6.tar.gz
abslibre-43a5bcc4818d2b06b0dbc8f53c9b9c26150e7dc6.tar.bz2
abslibre-43a5bcc4818d2b06b0dbc8f53c9b9c26150e7dc6.zip
grub-2.00-1: adding new grub to [libre] repo on abslibre
Diffstat (limited to 'libre/grub/grub2.install')
-rw-r--r--libre/grub/grub2.install33
1 files changed, 33 insertions, 0 deletions
diff --git a/libre/grub/grub2.install b/libre/grub/grub2.install
new file mode 100644
index 000000000..000533553
--- /dev/null
+++ b/libre/grub/grub2.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 -Dm644 /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
+}