summarylogtreecommitdiffstats
path: root/grub-imageboot.install
diff options
context:
space:
mode:
Diffstat (limited to 'grub-imageboot.install')
-rw-r--r--grub-imageboot.install28
1 files changed, 15 insertions, 13 deletions
diff --git a/grub-imageboot.install b/grub-imageboot.install
index a1ac38887004..afe0d442b07a 100644
--- a/grub-imageboot.install
+++ b/grub-imageboot.install
@@ -1,24 +1,26 @@
post_install() {
- cp /usr/lib/syslinux/bios/memdisk /boot/
-
- echo "------------------------------------------------------------"
- echo "> Place live iso images you want to boot in /boot/images/"
- echo "> To have them added to grub automatically, run"
- echo "> grub-mkconfig -o /boot/grub/grub.cfg"
- echo "------------------------------------------------------------"
+ if ! [ -e /boot/memdisk ]; then
+ cp -v '/usr/lib/syslinux/bios/memdisk' '/boot/memdisk'
+ fi
+
+ printf '%s\n' "------------------------------------------------------------"
+ printf '%s\n' "> Place live iso images you want to boot in /boot/images/."
+ printf '%s\n' "> To have them added to grub automatically, run"
+ printf '%s\n' "> grub-mkconfig -o /boot/grub/grub.cfg"
+ printf '%s\n' "------------------------------------------------------------"
}
post_upgrade() {
- post_install
+ post_install
}
post_remove() {
- rm /boot/memdisk
- grub-mkconfig -o /boot/grub/grub.cfg
+ grub-mkconfig -o /boot/grub/grub.cfg
- echo "------------------------------------------------------------"
- echo "> You may want to remove your iso images in /boot/images/"
- echo "------------------------------------------------------------"
+ printf '%s\n' "------------------------------------------------------------"
+ printf '%s\n' "> You may want to remove your iso images in '/boot/images/'".
+ printf '%s\n' "> You may also want to remove '/boot/memdisk', if it is not needed otherwise."
+ printf '%s\n' "------------------------------------------------------------"
}
# vim:set ts=2 sw=2 et: