You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

52 lines
1.6 KiB

  1. #!/bin/bash
  2. . config || exit 0
  3. set -e
  4. set -x
  5. # Customize the outer ISO image
  6. sed -i -s -e \
  7. "s/DISKNAME.*/DISKNAME NILMbuntu $VERSION/" \
  8. ${ISO}/README.diskdefines
  9. # The .disk/info file is important -- it's used by ubiquity to extract
  10. # out the distro name in dialogs, and I think casper might use it too
  11. echo "NILMbuntu $VERSION" > ${ISO}/.disk/info
  12. # Set up preseed file by appending preseed.cfg to the Xubuntu
  13. # default one
  14. cat ${ISO}/preseed/xubuntu.seed preseed.cfg > ${ISO}/preseed/nilmbuntu.seed
  15. # Set up isolinux how we want by editing its config
  16. TRY="Boot ^NILMbuntu ${VERSION}"
  17. cp splash.png ${ISO}/isolinux/splash.png
  18. perl -n -i \
  19. -e '$n=1 if /^label/; $n=2 if /^label live-install/; next if $n==2;' \
  20. -e "s/menu label.*(Try|NILM).*/menu label $TRY/g;" \
  21. -e "s,preseed/.*[.]seed,preseed/nilmbuntu.seed,g;" \
  22. -e "s/ quiet splash//g;" \
  23. -e "print;" \
  24. ${ISO}/isolinux/txt.cfg
  25. sed -i -s -e "s/^ui gfxboot/# ui gfxboot/g;" ${ISO}/isolinux/isolinux.cfg
  26. # Set up grub similarly
  27. TRY="Boot NILMbuntu ${VERSION}"
  28. perl -n -i \
  29. -e "next if /menuentry \"Install/../^}$/;" \
  30. -e "next if /menuentry \"OEM install/../^}$/;" \
  31. -e "s/menuentry \"(Try|NILM).*\" \{/menuentry \"${TRY}\" {/g;" \
  32. -e "s,preseed/.*[.]seed,preseed/nilmbuntu.seed,g;" \
  33. -e "s/ quiet splash//g;" \
  34. -e "print;" \
  35. ${ISO}/boot/grub/{grub,loopback}.cfg
  36. if ! [ "$1" == "skip" ] ; then
  37. # Run the customize-inner.sh script inside the chroot
  38. sudo cp nilmbuntu.png ${FS}/usr/share/xfce4/backdrops/nilmbuntu.png
  39. sudo cp customize-inner.sh ${FS}/root/customize-inner.sh
  40. sudo chmod +x ${FS}/root/customize-inner.sh
  41. ./enter.sh "cd /root ; ./customize-inner.sh"
  42. fi