added generating iso part plus lotsa updated logic

This commit is contained in:
2020-05-02 01:30:03 -05:00
parent 847ef7624c
commit db48988a5d
22 changed files with 19003 additions and 7 deletions

View File

@@ -10,13 +10,15 @@ dpkg-divert --rename --remove /sbin/initctl
# Remove old kernels
ls /boot/vmlinuz-2.6.**-**-generic > list.txt
ls /boot/vmlinuz-5.4.**-**-generic > list.txt
sum=$(cat list.txt | grep '[^ ]' | wc -l)
if [ $sum -gt 1 ]; then
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
fi
rm list.txt
# Remove the network stuff
apt-get clean
rm -rf /tmp/*
rm /etc/resolv.conf