]> git.sur5r.net Git - bacula/rescue/blob - rescue/linux/usb/remaster/update_packages
Update
[bacula/rescue] / rescue / linux / usb / remaster / update_packages
1 #!/bin/sh
2 #
3 # Update squashfs -- assumes you start with a Hardy 8.04.1 desktop,
4 #   but it should work even if you have already updated it.
5 #
6
7 if [ ! -d sqfs ] ; then
8   echo "Cannot find squashfs (sqfs directory)"
9   exit 1
10 fi
11 chroot sqfs /bin/sh
12 mount -t proc none /proc/
13 mount -t sysfs non /sys/
14 export HOME=/root
15
16 # remove packages
17 apt-get remove --purge `dpkg-query -W --showformat '${Package}\n' | grep language-pack | egrep -v '\-en'`
18 apt-get remove --purge `dpkg-query -W --showformat '${Package}\n' | grep openoffice\.org-`
19 apt-get remove --purge amarok dictionaries-common
20
21 cat >/etc/apt/sources.list <<EOF
22 deb http://archive.ubuntu.com/ubuntu/ hardy main restricted
23 deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted
24 deb http://archive.ubuntu.com/ubuntu/ hardy universe
25 deb http://archive.ubuntu.com/ubuntu/ hardy-updates universe
26 deb http://archive.ubuntu.com/ubuntu/ hardy multiverse
27 deb http://archive.ubuntu.com/ubuntu/ hardy-security main restricted
28 deb http://archive.ubuntu.com/ubuntu/ hardy-security universe
29 deb http://archive.ubuntu.com/ubuntu/ hardy-security multiverse
30 deb http://archive.ubuntu.com/ubuntu/ hardy-updates multiverse
31 EOF
32 apt-get update
33 apt-get upgrade
34
35 # Add new packages
36 apt-get install openssh-server subversion kdetoys kicker-applets kgpg gftp \
37   firefox sg3-utils
38 apt-get install flashplugin-nonfree aircrack-ng g++ nvidia-glx-new gfxboot \
39   syslinux mtools
40
41 # Add heldback packages
42 apt-get install bind9-host dnsutils libbind9-30 libisccc30 libisccfg30 \
43   linux-generic linux-headers-generic linux-image-generic \
44   linux-restricted-modules-generic ssl-cert
45
46 # Remove old kernel
47 apt-get remove linux-headers-2.6.24-19 linux-headers-2.6.24-19-generic \
48   linux-image-2.6.24-19-generic linux-restricted-modules-2.6.24-19-generic \
49   linux-restricted-modules-2.6.24-22-generic linux-ubuntu-modules-2.6.24-19-generic
50
51 cd /
52 dpkg-query -W --showformat='${Package} ${Version}\n' >filesystem.manifest
53
54 apt-get clean
55 rm -rf /tmp/*
56 rm -f /etc/hosts /etc/resolv.conf
57 umount /proc/
58 umount /sys/
59 exit
60 cp sqfs/filesystem.manifest .
61 rm -f sqfs/filsystem.manifest