Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. Index: geninitrd/geninitrd
  2. ===================================================================
  3. --- geninitrd/geninitrd (wersja 11877)
  4. +++ geninitrd/geninitrd (kopia robocza)
  5. @@ -1309,6 +1309,9 @@
  6.  
  7. if [ "$INITRDFS" = "initramfs" ]; then
  8. initrd_gen_initramfs_switchroot
  9. + if is_ues "$BOOT_SPLASH"; then
  10. + initramfs_gen_bootsplash $DESTDIR
  11. + fi
  12. else
  13. umount_all
  14. fi
  15. Index: geninitrd/mod-bootsplash.sh
  16. ===================================================================
  17. --- geninitrd/mod-bootsplash.sh (wersja 11877)
  18. +++ geninitrd/mod-bootsplash.sh (kopia robocza)
  19. @@ -56,3 +56,42 @@
  20. fi
  21. done
  22. }
  23. +
  24. +
  25. +# generate initrd fragment
  26. +# @access public
  27. +initramfs_gen_bootsplash() {
  28. + local target="$1"
  29. +
  30. + debug "Generating bootsplash"
  31. +
  32. + if [ ! -x /bin/splash.bin ]; then
  33. + warn "Failed to execute /bin/splash.bin. Is bootsplash package installed?"
  34. + return
  35. + fi
  36. +
  37. + if [ -r /etc/sysconfig/bootsplash ]; then
  38. + . /etc/sysconfig/bootsplash
  39. + fi
  40. +
  41. + if [ -z "$THEME" ]; then
  42. + warn "Please configure your /etc/sysconfig/bootsplash first."
  43. + warn "Generating bootsplashes skipped."
  44. + return
  45. + fi
  46. +
  47. + if [ -z "$BOOT_SPLASH_RESOLUTIONS" ]; then
  48. + warn "No BOOT_SPLASH_RESOLUTIONS specified in /etc/sysconfig/bootsplash."
  49. + warn "Not adding bootsplash to initrd."
  50. + fi
  51. +
  52. + local res
  53. + for res in $BOOT_SPLASH_RESOLUTIONS; do
  54. + if [ -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" ]; then
  55. + $bootsplash_geninitramfs -s -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" > "${target}/bootsplash" && \
  56. + debug "Added $res $THEME theme to initramfs."
  57. + else
  58. + warn "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, skipped"
  59. + fi
  60. + done
  61. +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement