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.7 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 files/preseed.cfg > ${ISO}/preseed/nilmbuntu.seed
  15. # Set up isolinux how we want by editing its config
  16. TRY="Boot ^NILMbuntu ${VERSION}"
  17. cp files/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 Xubuntu without installing/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/^menu margin .*/menu margin 2/g;" ${ISO}/isolinux/menu.cfg
  26. sed -i -s -e "s/^ui gfxboot/# ui gfxboot/g;" ${ISO}/isolinux/isolinux.cfg
  27. # Set up grub similarly
  28. TRY="Boot NILMbuntu ${VERSION}"
  29. perl -n -i \
  30. -e "next if /menuentry \"Install/../^}$/;" \
  31. -e "next if /menuentry \"OEM install/../^}$/;" \
  32. -e "s/Try Xubuntu without installing/${TRY}/g;" \
  33. -e "s,preseed/.*[.]seed,preseed/nilmbuntu.seed,g;" \
  34. -e "s/ quiet splash//g;" \
  35. -e "print;" \
  36. ${ISO}/boot/grub/{grub,loopback}.cfg
  37. sudo install -D -m 0644 files/fallback_dns.conf ${FS}/etc/systemd/resolved.conf.d/fallback_dns.conf
  38. if ! [ "$1" == "skip" ] ; then
  39. # Run the customize-inner.sh script inside the chroot
  40. ./enter.sh "cd /root ; files/customize-inner.sh"
  41. fi