|
|
|
@ -22,41 +22,41 @@ WORKDIR="$SPATH/$iso_wo_ext"
|
|
|
|
|
|
|
|
|
|
echo "==== Prepare CD ===="
|
|
|
|
|
mkdir /tmp/livecd || :
|
|
|
|
|
sudo mount -o loop "$1" /tmp/livecd
|
|
|
|
|
fuseiso "$1" /tmp/livecd
|
|
|
|
|
|
|
|
|
|
mkdir -p "$WORKDIR"
|
|
|
|
|
rsync --exclude=/casper/filesystem.squashfs -a /tmp/livecd/ "$WORKDIR/cd"
|
|
|
|
|
mkdir "$WORKDIR/squashfs" "$WORKDIR/custom"
|
|
|
|
|
sudo modprobe squashfs
|
|
|
|
|
sudo mount -t squashfs -o loop /tmp/livecd/casper/filesystem.squashfs "$WORKDIR/squashfs/"
|
|
|
|
|
# rsync --exclude=/casper/filesystem.squashfs -a /tmp/livecd/ "$WORKDIR/cd"
|
|
|
|
|
mkdir "$WORKDIR/squashfs"
|
|
|
|
|
squashfuse /tmp/livecd/casper/filesystem.squashfs "$WORKDIR/squashfs/"
|
|
|
|
|
|
|
|
|
|
echo "==== Copy squashfs contents to $WORKDIR/custom ===="
|
|
|
|
|
sudo cp -a "$WORKDIR"/squashfs/* "$WORKDIR/custom"
|
|
|
|
|
echo "==== Copy squashfs contents to $WORKDIR/squashfs/squashfs-root ===="
|
|
|
|
|
nprocs=$(($(nproc)-1)) # leave 1 proc for use
|
|
|
|
|
unsquashfs -p$nprocs -no-xattrs /tmp/livecd/casper/filesystem.squashfs
|
|
|
|
|
|
|
|
|
|
# network access
|
|
|
|
|
sudo cp /etc/resolv.conf /etc/hosts "$WORKDIR/custom/etc/"
|
|
|
|
|
cp /etc/resolv.conf /etc/hosts "$WORKDIR/squashfs/squashfs-root/etc/"
|
|
|
|
|
|
|
|
|
|
# mount proc, sys, opens a shell (for changes), and clean everything after
|
|
|
|
|
echo "==== CHROOT ===="
|
|
|
|
|
cat "$SPATH/tasks.sh" | sudo chroot "$WORKDIR/custom" /bin/bash
|
|
|
|
|
cat "$SPATH/tasks.sh" | chroot "$WORKDIR/squashfs/squashfs-root" /bin/bash
|
|
|
|
|
|
|
|
|
|
echo "==== Copy custom background ===="
|
|
|
|
|
sudo cp background/sele_ring_lis67.jpg "$WORKDIR/custom/usr/share/backgrounds/linuxmint/sele_ring_lis67.jpg"
|
|
|
|
|
sudo cp background/sele_ring_lis67.jpg "$WORKDIR/squashfs/squashfs-root/usr/share/backgrounds/linuxmint/sele_ring_lis67.jpg"
|
|
|
|
|
|
|
|
|
|
echo "==== Copy Firefox settings ===="
|
|
|
|
|
sudo cp "$SPATH/firefox/distribution.ini" "$WORKDIR/custom/usr/lib/firefox/distribution/distribution.ini"
|
|
|
|
|
sudo cp "$SPATH/firefox/distribution.ini" "$WORKDIR/custom/usr/share/ubuntu-system-adjustments/firefox/distribution.ini"
|
|
|
|
|
sudo cp "$SPATH/firefox/distribution.ini" "$WORKDIR/squashfs/squashfs-root/usr/lib/firefox/distribution/distribution.ini"
|
|
|
|
|
sudo cp "$SPATH/firefox/distribution.ini" "$WORKDIR/squashfs/squashfs-root/usr/share/ubuntu-system-adjustments/firefox/distribution.ini"
|
|
|
|
|
|
|
|
|
|
sudo cp "$SPATH/firefox/vendor-firefox.js" "$WORKDIR/custom/usr/lib/firefox/browser/defaults/preferences/vendor-firefox.js"
|
|
|
|
|
sudo cp "$SPATH/firefox/vendor-firefox.js" "$WORKDIR/custom/usr/share/ubuntu-system-adjustments/firefox/firefox.js"
|
|
|
|
|
sudo cp "$SPATH/firefox/vendor-firefox.js" "$WORKDIR/squashfs/squashfs-root/usr/lib/firefox/browser/defaults/preferences/vendor-firefox.js"
|
|
|
|
|
sudo cp "$SPATH/firefox/vendor-firefox.js" "$WORKDIR/squashfs/squashfs-root/usr/share/ubuntu-system-adjustments/firefox/firefox.js"
|
|
|
|
|
|
|
|
|
|
echo "==== Disable Yahoo, enable Startpage on Firefox ===="
|
|
|
|
|
cd "$SPATH/firefox"
|
|
|
|
|
sudo zip "$WORKDIR/custom/usr/lib/firefox/browser/omni.ja" defaults/settings/main/search-config.json
|
|
|
|
|
sudo zip "$WORKDIR/squashfs/squashfs-root/usr/lib/firefox/browser/omni.ja" defaults/settings/main/search-config.json
|
|
|
|
|
cd -
|
|
|
|
|
|
|
|
|
|
echo "==== Install extensions ===="
|
|
|
|
|
sudo cp "$SPATH/firefox/extensions/"* "$WORKDIR/custom/usr/lib/firefox/distribution/extensions/"
|
|
|
|
|
sudo cp "$SPATH/firefox/extensions/"* "$WORKDIR/squashfs/squashfs-root/usr/lib/firefox/distribution/extensions/"
|
|
|
|
|
|
|
|
|
|
echo "==== Mod ISOLINUX (BIOS) AND GRUB (EFI) ===="
|
|
|
|
|
if [[ -d isolinux ]]; then
|
|
|
|
@ -73,9 +73,9 @@ fi
|
|
|
|
|
# setup iso
|
|
|
|
|
echo "==== Setup ISO ===="
|
|
|
|
|
chmod +w "$WORKDIR/cd/casper/filesystem.manifest"
|
|
|
|
|
sudo chroot "$WORKDIR/custom" dpkg-query -W --showformat='${Package} ${Version}\n' > "$WORKDIR/cd/casper/filesystem.manifest"
|
|
|
|
|
sudo chroot "$WORKDIR/squashfs/squashfs-root" dpkg-query -W --showformat='${Package} ${Version}\n' > "$WORKDIR/cd/casper/filesystem.manifest"
|
|
|
|
|
sudo cp "$WORKDIR/cd/casper/filesystem.manifest" "$WORKDIR/cd/casper/filesystem.manifest-desktop"
|
|
|
|
|
sudo mksquashfs "$WORKDIR/custom" "$WORKDIR/cd/casper/filesystem.squashfs"
|
|
|
|
|
sudo mksquashfs "$WORKDIR/squashfs/squashfs-root" "$WORKDIR/cd/casper/filesystem.squashfs"
|
|
|
|
|
sudo rm "$WORKDIR/cd/MD5SUMS"
|
|
|
|
|
sudo chmod +w "$WORKDIR/cd"
|
|
|
|
|
sudo bash -c 'cd '"$WORKDIR"'/cd && find . -type f -exec md5sum {} +' > "$WORKDIR"/cd/MD5SUMS
|
|
|
|
|