|
- #!/bin/bash
-
- . config || exit 0
- set -e
- set -x
-
- # Customize the outer ISO image
- sed -i -s -e \
- "s/DISKNAME.*/DISKNAME NILMbuntu $VERSION/" \
- ${ISO}/README.diskdefines
-
- # The .disk/info file is important -- it's used by ubiquity to extract
- # out the distro name in dialogs, and I think casper might use it too
- echo "NILMbuntu $VERSION" > ${ISO}/.disk/info
-
- # Set up preseed file by appending preseed.cfg to the Xubuntu
- # default one
- cat ${ISO}/preseed/xubuntu.seed preseed.cfg > ${ISO}/preseed/nilmbuntu.seed
-
- # Set up isolinux how we want by editing its config
- TRY="Boot ^NILMbuntu ${VERSION}"
- cp splash.png ${ISO}/isolinux/splash.png
- perl -n -i \
- -e '$n=1 if /^label/; $n=2 if /^label live-install/; next if $n==2;' \
- -e "s/menu label.*(Try|NILM).*/menu label $TRY/g;" \
- -e "s,preseed/.*[.]seed,preseed/nilmbuntu.seed,g;" \
- -e "s/ quiet splash//g;" \
- -e "print;" \
- ${ISO}/isolinux/txt.cfg
- sed -i -s -e "s/^ui gfxboot/# ui gfxboot/g;" ${ISO}/isolinux/isolinux.cfg
-
- # Set up grub similarly
- TRY="Boot NILMbuntu ${VERSION}"
- perl -n -i \
- -e "next if /menuentry \"Install/../^}$/;" \
- -e "next if /menuentry \"OEM install/../^}$/;" \
- -e "s/menuentry \"(Try|NILM).*\" \{/menuentry \"${TRY}\" {/g;" \
- -e "s,preseed/.*[.]seed,preseed/nilmbuntu.seed,g;" \
- -e "s/ quiet splash//g;" \
- -e "print;" \
- ${ISO}/boot/grub/{grub,loopback}.cfg
-
- if ! [ "$1" == "skip" ] ; then
-
- # Run the customize-inner.sh script inside the chroot
- sudo cp nilmbuntu.png ${FS}/usr/share/xfce4/backdrops/nilmbuntu.png
- sudo cp customize-inner.sh ${FS}/root/customize-inner.sh
- sudo chmod +x ${FS}/root/customize-inner.sh
- ./enter.sh "cd /root ; ./customize-inner.sh"
-
- fi
|