update hooks

parent 82ffeabd
#!/bin/bash
set -e
export DEBIAN_FRONTEND=noninteractive
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:~/.local/bin:/snap/bin:$PATH
# Handle systems where /lib is not merged in /usr/lib
if [ ! -h /lib ]; then
mv /usr/lib/live/config/* /lib/live/config/
fi
echo "Removing useless stuff"
apt-get purge -y qt4-designer qttools5-dev-tools texlive-latex-extra-doc texlive-pstricks-doc texlive-pictures-doc texlive-latex-recommended-doc texlive-latex-base-doc texlive-fonts-recommended-doc texlive-pstricks-doc python-mpltoolkits.basemap-data leafpad xpra ferret minicom xpdf gvim openjdk-10-* llvm-7-dev libpython3.6-dev python-scipy python-all python-all-dev || true
......@@ -64,13 +69,24 @@ echo "btrfs" >> /etc/initramfs-tools/modules
#echo "zfs" >> /etc/initramfs-tools/modules
echo "Enabling cryptsetup initramfs support"
sed -i "s/#CRYPTSETUP=/CRYPTSETUP=y/" /etc/cryptsetup-initramfs/conf-hook || true
if [ -e /etc/cryptsetup-initramfs/conf-hook ]; then
if grep -q '^#CRYPTSETUP=' /etc/cryptsetup-initramfs/conf-hook; then
sed -i -e 's/^#CRYPTSETUP=.*/CRYPTSETUP=y/' /etc/cryptsetup-initramfs/conf-hook
else
echo "CRYPTSETUP=y" >>/etc/cryptsetup-initramfs/conf-hook
fi
fi
update-initramfs -c -u -t -k all || true
firecfg --clean | true
firecfg | true
# Hold kernel packages in live image.
for pkg in $(dpkg-query -f'${binary:Package}\n' -l 'linux-image-*' 'linux-headers-*' 'linux-kbuild-*' | grep ii | awk '{print $2}'); do
apt-mark hold $pkg
done
if [ -x "$(which updatedb 2>/dev/null)" ]; then
updatedb
fi
......@@ -3,4 +3,5 @@
set -e
# Reconfigure parrot APT mirror
in-target sh -c 'cat /etc/apt/sources.list.parrot > /etc/apt/sources.list;parrot-mirror-selector default'
in-target sh -c "cp /etc/apt/sources.list.parrot /etc/apt/sources.list"
in-target sh -c "parrot-mirror-selector default"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment