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