From f369f61f484cba929b8ec2ed620cb8ff7a0ad3f3 Mon Sep 17 00:00:00 2001 From: Jim Paris Date: Mon, 19 Aug 2013 11:58:48 -0400 Subject: [PATCH] More tweaks and fixes --- buildiso.sh | 4 ++++ customize.sh | 43 +++++++++++++++++++++++-------------------- full-rebuild.sh | 4 ++++ splash.png | Bin 0 -> 1454 bytes 4 files changed, 31 insertions(+), 20 deletions(-) create mode 100644 splash.png diff --git a/buildiso.sh b/buildiso.sh index b3059de..d8edf31 100755 --- a/buildiso.sh +++ b/buildiso.sh @@ -6,6 +6,8 @@ set -x set -e +if ! [ "$1" == "skip" ] ; then + # copy kernel if changed if [ ${FS}/initrd.img -nt ${ISO}/casper/initrd.lz ] ; then sudo cp ${FS}/vmlinuz ${ISO}/casper/vmlinuz @@ -23,6 +25,8 @@ sudo mksquashfs ${FS} ${ISO}/casper/filesystem.squashfs printf $(sudo du -sx --block-size=1 ${FS} | cut -f1) \ | sudo tee ${ISO}/casper/filesystem.size +fi + # md5sums sudo rm -f md5sum.txt sudo find ${ISO} -type f -print0 \ diff --git a/customize.sh b/customize.sh index b797e93..6b73aa6 100755 --- a/customize.sh +++ b/customize.sh @@ -41,31 +41,34 @@ d-i user-setup/allow-password-weak boolean true d-i passwd/auto-login boolean true EOF -# Rename Xubuntu to NilmDBuntu in boot scripts; also changes -# preseed file to the custom one -sed -i -s \ - -e "s/Xubuntu/NilmDBuntu/g;" \ - -e "s/Kubuntu/NilmDBuntu/g;" \ - -e "s/Ubuntu/NilmDBuntu/g;" \ - -e "s,preseed/xubuntu,preseed/nilmdbuntu,g;" \ - -e "s,preseed/kubuntu,preseed/nilmdbuntu,g;" \ - -e "s,preseed/ubuntu,preseed/nilmdbuntu,g;" \ - ${ISO}/isolinux/txt.cfg ${ISO}/boot/grub/{grub,loopback}.cfg +# Set up isolinux how we want by editing its config +TRY="Try NilmDBuntu ${VERSION}, with option to install" +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.*/menu label ^$TRY/g;" \ + -e "s,preseed/.*[.]seed,preseed/nilmdbuntu.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 -# Remove quiet and splash from boot command lines. Easier than a -# custom plymouth theme and it's helpful info. -sed -i -s -e "s/ quiet splash//g;" \ - ${ISO}/isolinux/txt.cfg ${ISO}/boot/grub/{grub,loopback}.cfg +# Set up grub similarly +perl -n -i \ + -e "next if /menuentry \"Install/../^}$/;" \ + -e "next if /menuentry \"OEM install/../^}$/;" \ + -e "s/menuentry \"Try.*\" {/menuentry \"${TRY}\" {/g;" \ + -e "s,preseed/.*[.]seed,preseed/nilmdbuntu.seed,g;" \ + -e "s/ quiet splash//g;" \ + -e "print;" \ + ${ISO}/boot/grub/{grub,loopback}.cfg -# Remove hidden-timeout from isolinux. Otherwise, isolinux -# automatically adds "maybe-ubiquity" to the kernel command line. -# This prevents that, which means it will go directly to the live -# desktop with the sweet background pic. -sed -i -s -e "s/^hidden-timeout/# hidden-timeout/g" \ - ${ISO}/isolinux/gfxboot.cfg +if ! [ "$1" == "skip" ] ; then # Run the customize-inner.sh script inside the chroot sudo cp nilmdbuntu.png ${FS}/usr/share/xfce4/backdrops/nilmdbuntu.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 diff --git a/full-rebuild.sh b/full-rebuild.sh index 5b8a36c..d86d50d 100755 --- a/full-rebuild.sh +++ b/full-rebuild.sh @@ -13,6 +13,10 @@ set -e rm -f ${OUTPUT} ./cleanup.sh +for d in ${ORIG} ${OUTPUT} ${DISK} ; do + mkdir -p $(dirname $d) + chown ${USER} $d +done ./extractiso.sh ./customize.sh ./buildiso.sh diff --git a/splash.png b/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..5ce3199a389108b2cece5d4563a156e886def5e3 GIT binary patch literal 1454 zcmcJPYg7^j9L0I~C=GRJVu_e@KFUz6lPGAGlOfa0Ij4}Qnz~?(mp*u~{rhagXQ_iB9%=)a~=H}-Prw}G1#z9OY>s(gSvFXh)D)06m3>^lvk zS}I$rJC(1E%-|Yp7a~g5^pKCo-A$VQuHn_p!~M!9eokqWWG7%4q;~ z8BtK-??lmhZ$H>Pe~Q0qAYS-$W;TaK%I9k=>ED^7ybs2TPyrQJTdY)NgK1UW3;0|? z1yUAlxXK*hoX?Wwx3q`2mrP!648n%Sg2s;^DfLdLt(lA^Gt5pSEV|z|Ovr|CC+K!f z7V1>H>f;Z$eYj_dlm;YgW0xL8%%n|Fo$-%jrV-2YPoi<5Yc zb!Hd@Qs&A6KF%ujQ`lXwujb@g-9&)TlF@w57)~(= zeAB`?V}tO2)J-}OB|4f_)I7}j)TulAa^H`lPSnZF+BulOcv%;2Txe9p*+}gDi#6|1 zZyrDKZiNd~%9+oPv@Xb1XQP85$$LG?5MsQ|BN%hGc?-}u@7(oi8V()G%XI>BZ?V+i zgN4##_1~P%Th?9IjuqEslX{AhVaKbysfu7sD~yacY|Vi(|YZmm%FavHcEI1^$|@=eQPo{qq91Y^J7Ej@r9ThunQlXWh$x zAH@Q1{tr0*3Ms&qV?LzR(71H=F6qb7>l|*3DTJ6~yRZbTO0Q0`9S$XCJ?hEU01FLC zEYY0x+lR1c8bV)8s5R3qj##xM9#rb