Skip to content

Commit

Permalink
Bump to 22.04 (#305)(#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakuna-m committed May 22, 2022
1 parent caec1af commit c245db8
Show file tree
Hide file tree
Showing 15 changed files with 597 additions and 284 deletions.
39 changes: 39 additions & 0 deletions data/custom-installation/hooks/early-command.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
#!/bin/sh
set -x

##
## copy from scripts/casper-bottom/05mountpoints_lupin
##
if grep -q '^[^ ]* /isodevice ' /proc/mounts; then
mkdir -p /root/isodevice
mount -n -o move /isodevice /root/isodevice
fi

if [ -n $1 ] && [ -d "/root/isodevice$1" ]; then
##
## replacement for the necessary parts of scripts/casper-premount/30custom_installation
##
mkdir -p /custom-installation
cp -af "/root/isodevice$1"/* /custom-installation/
if [ -e /custom-installation/preseed.cfg ]; then
cp /custom-installation/preseed.cfg /
dev=$(cat /proc/mounts | grep '^[^ ]* /root/isodevice ' | cut -f 1 -d ' ')
disk="$(echo "$dev" | sed 's/[0-9]*$//')"
partn=${dev#${disk}}
sed -i "s:LIDISK:$disk:g" /preseed.cfg
sed -i "s:LIPARTITION:$partn:g" /preseed.cfg
dev=${dev#/dev/}
sed -i "s:MADEVICE:$dev:g" /preseed.cfg
fi
##
## copy from scripts/casper-bottom/10custom_installation
##
cp -af /custom-installation/ /root/custom-installation || true
if [ -x /custom-installation/hooks/casper-bottom.sh ]; then
/custom-installation/hooks/casper-bottom.sh
fi
##
## copy from scripts/casper-bottom/24preseed
##
if [ -e /preseed.cfg ]; then
casper-set-selections /preseed.cfg
fi
fi

if [ -f /custom-installation/hooks/post-installer.sh ]; then
mkdir -p /root/usr/lib/ubiquity/target-config
cp /custom-installation/hooks/post-installer.sh /root/usr/lib/ubiquity/target-config/10post-installer
Expand Down
32 changes: 13 additions & 19 deletions data/custom-installation/hooks/post-installer.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,21 @@ if [ -f /custom-installation/patch/loop-remount ]; then
chmod +x /target/etc/initramfs-tools/hooks/loop-remount
fi

if [ -f /custom-installation/patch/grub-install ] && [ -f /custom-installation/patch/grub-install-efi ] ; then
##
## Replacement for package lupin-support
##
if [ -f /custom-installation/patch/grub-install ]; then
mkdir -p /target/usr/local/sbin
cp /custom-installation/patch/grub-install /target/usr/local/sbin/grub-install
chmod +x /target/usr/local/sbin/grub-install
if [ -d /sys/firmware/efi ]; then
cp /custom-installation/patch/grub-install-efi /target/usr/local/sbin/grub-install-efi
chmod +x /target/usr/local/sbin/grub-install-efi
fi
if [ -f /custom-installation/patch/grub-install ] ; then
cp /custom-installation/patch/grub-mkimage-lupin /target/usr/local/sbin/grub-mkimage-lupin
chmod +x /target/usr/local/sbin/grub-mkimage-lupin
fi
if [ -f /custom-installation/patch/lupin-grub-install ] ; then
mkdir -p /target/etc/grub.d
cp /custom-installation/patch/lupin-grub-install /target/etc/grub.d/10_lupin_grub_install
chmod +x /target/etc/grub.d/10_lupin_grub_install
fi
fi

arch=$(dpkg --print-architecture)
if [ ! -f /etc/grub.d/10_lupin ] && [ -f /custom-installation/packages/lupin-support/*$arch.deb ] ; then
mkdir -p /var/cache/driver-updates
cp /custom-installation/packages/lupin-support/*$arch.deb /var/cache/driver-updates/.
if [ -f /custom-installation/patch/grub-mkimage-lupin ] ; then
mkdir -p /target/usr/local/sbin
cp /custom-installation/patch/grub-mkimage-lupin /target/usr/local/sbin/grub-mkimage-lupin
chmod +x /target/usr/local/sbin/grub-mkimage-lupin
fi
if [ -f /custom-installation/patch/10_lupin ] ; then
mkdir -p /target/etc/grub.d
cp /custom-installation/patch/10_lupin /target/etc/grub.d/10_lupin
chmod +x /target/etc/grub.d/10_lupin
fi
Loading

0 comments on commit c245db8

Please sign in to comment.