X-Git-Url: https://git.sur5r.net/?p=bacula%2Frescue;a=blobdiff_plain;f=rescue%2Flinux%2Foldusb%2Fremaster%2Fupdate_packages;fp=rescue%2Flinux%2Foldusb%2Fremaster%2Fupdate_packages;h=5739e2c427a234951466a8e98e933641002c1072;hp=0000000000000000000000000000000000000000;hb=fb21b5066e01a80263767f2406829a10dfa58303;hpb=0a3515b92eb06f0fee16cee0f189ae5aa83b4414 diff --git a/rescue/linux/oldusb/remaster/update_packages b/rescue/linux/oldusb/remaster/update_packages new file mode 100644 index 0000000..5739e2c --- /dev/null +++ b/rescue/linux/oldusb/remaster/update_packages @@ -0,0 +1,82 @@ +#!/bin/sh +# +# Update squashfs -- assumes you start with a Hardy 8.04.1 desktop, +# but it should work even if you have already updated it. +# + +if [ ! -d sqfs ] ; then + echo "Cannot find squashfs (sqfs directory)" + exit 1 +fi +chroot sqfs /bin/sh +mount -t proc none /proc/ +mount -t sysfs non /sys/ +export HOME=/root + +# remove packages +apt-get remove --purge `dpkg-query -W --showformat '${Package}\n' | grep language-pack | egrep -v '\-en'` +apt-get remove --purge `dpkg-query -W --showformat '${Package}\n' | grep openoffice\.org-` +apt-get remove --purge amarok dictionaries-common + +cat >/etc/resolv.conf </etc/apt/sources.list <filesystem.manifest + +apt-get clean +rm -rf /tmp/* +rm -f /etc/hosts /etc/resolv.conf +umount /proc/ +umount /sys/ +exit +cp sqfs/filesystem.manifest . +rm -f sqfs/filsystem.manifest + +echo "Warning!!!! At this point, it may be better to reboot, since" +echo " upgrading packages may have restarted some daemons such as" +echo " cups, which uses sqfs/proc. If you thn try to pack the sqfs" +echo " you will get lots of errors reference /proc. Rebooting" +echo " resolves this problem." +echo " "