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.
 
 
 

39 lines
1.3 KiB

  1. #!/bin/bash
  2. . config || exit 0
  3. set -e
  4. set -x
  5. # Customize the outer ISO image
  6. perl -p -i -e \
  7. "s/DISKNAME.*/DISKNAME NilmDBuntu $VERSION by Jim Paris/" \
  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 "NilmDBuntu $VERSION by Jim Paris" > ${ISO}/.disk/info
  12. # Include openssh server at install time. Can't include it in the
  13. # image, because then we'd share keys on all machines, I think.
  14. cp ${ISO}/preseed/xubuntu.seed ${ISO}/preseed/nilmdbuntu.seed
  15. cat >> ${ISO}/preseed/nilmdbuntu.seed <<EOF
  16. d-i pkgsel/include string openssh-server
  17. EOF
  18. # Rename Xubuntu to NilmDBuntu in boot scripts; also changes
  19. # preseed file to the custom one
  20. perl -p -i \
  21. -e "s/Xubuntu/NilmDBuntu/g;" \
  22. -e "s/xubuntu/nilmdbuntu/g;" \
  23. ${ISO}/isolinux/txt.cfg ${ISO}/boot/grub/{grub,loopback}.cfg
  24. # Remove quiet and splash from boot command lines. Easier than a
  25. # custom plymouth theme and it's helpful.
  26. perl -p -i -e "s/ quiet splash//g;" \
  27. ${ISO}/isolinux/txt.cfg ${ISO}/boot/grub/{grub,loopback}.cfg
  28. # Run the customize-inner.sh script inside the chroot
  29. sudo cp customize-inner.sh ${FS}/root/customize-inner.sh
  30. sudo chmod +x ${FS}/root/customize-inner.sh
  31. ./enter.sh "cd /root ; ./customize-inner.sh"