Advertisement
Guest User

zz-update-grub

a guest
Oct 16th, 2014
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #! /bin/sh
  2. set -e
  3.  
  4. which update-grub >/dev/null 2>&1 || exit 0
  5.  
  6. if type running-in-container >/dev/null 2>&1 && \
  7. running-in-container >/dev/null; then
  8. exit 0
  9. fi
  10.  
  11. set -- $DEB_MAINT_PARAMS
  12. mode="${1#\'}"
  13. mode="${mode%\'}"
  14. case $0:$mode in
  15. # Only run on postinst configure and postrm remove, to avoid wasting
  16. # time by calling update-grub multiple times on upgrade and removal.
  17. # Also run if we have no DEB_MAINT_PARAMS, in order to work with old
  18. # kernel packages.
  19. */postinst.d/*:|*/postinst.d/*:configure|*/postrm.d/*:|*/postrm.d/*:remove)
  20. if [ -e /boot/grub/grub.cfg ]; then
  21. exec update-grub
  22. fi
  23. ;;
  24. esac
  25.  
  26. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement