Browse Source

More tweaks and fixes

tags/nilmdbuntu-1
Jim Paris 10 years ago
parent
commit
f369f61f48
4 changed files with 31 additions and 20 deletions
  1. +4
    -0
      buildiso.sh
  2. +23
    -20
      customize.sh
  3. +4
    -0
      full-rebuild.sh
  4. BIN
      splash.png

+ 4
- 0
buildiso.sh View File

@@ -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 \


+ 23
- 20
customize.sh View File

@@ -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

+ 4
- 0
full-rebuild.sh View File

@@ -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


BIN
splash.png View File

Before After
Width: 640  |  Height: 480  |  Size: 1.4 KiB

Loading…
Cancel
Save