]> git.sur5r.net Git - bacula/rescue/blob - rescue/linux/usb/removepackages
Update
[bacula/rescue] / rescue / linux / usb / removepackages
1 #!/bin/sh
2 #
3 # Update squashfs
4 #
5
6 chroot sqfs /bin/sh
7 mount -t proc none /proc/
8 mount -t sysfs non /sys/
9 export HOME=/root
10 apt-get remove --purge `dpkg-query -W --showformat '${Package}\n' | grep language-pack | egrep -v '\-en'`
11 apt-get remove --purge `dpkg-query -W --showformat '${Package}\n' | grep openoffice\.org-`
12
13 cat >/etc/apt/sources.list <<EOF
14 deb http://archive.ubuntu.com/ubuntu/ hardy main restricted
15 deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted
16 deb http://archive.ubuntu.com/ubuntu/ hardy universe
17 deb http://archive.ubuntu.com/ubuntu/ hardy-updates universe
18 deb http://archive.ubuntu.com/ubuntu/ hardy multiverse
19 deb http://archive.ubuntu.com/ubuntu/ hardy-security main restricted
20 deb http://archive.ubuntu.com/ubuntu/ hardy-security universe
21 deb http://archive.ubuntu.com/ubuntu/ hardy-security multiverse
22 deb http://archive.ubuntu.com/ubuntu/ hardy-updates multiverse
23 EOF
24 apt-get update
25 apt-get upgrade
26
27 # Add new packages
28 apt-get install openssh-server subversion kdetoys kicker-applets kgpg gftp \
29  firefox sg3-utils
30
31 cd /
32 dpkg-query -W --showformat='${Package} ${Version}\n' >filesystem.manifest
33
34 apt-get clean
35 rm -rf /tmp/*
36 rm -f /etc/hosts /etc/resolv.conf
37 umount /proc/
38 umount /sys/
39 exit
40 cp sqfs/filesystem.manifest .
41 rm -f sqfs/filsystem.manifest