File: apt-setup

package info (click to toggle)
base-config 2.53.10.3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,072 kB
  • ctags: 36
  • sloc: sh: 1,755; makefile: 101; perl: 48
file content (22 lines) | stat: -rwxr-xr-x 695 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh -e
# Set up apt sources list.

# On new installs, comment out the shipped sources.list, since it assumes
# they are on the network, which is wrong if this is a CD install (this may
# no longer br true; debootstrap generates a pretty decent sources.list).
# Anyway apt-setup generates a better one. Touch the file in any case, because
# apt-setup requires it exist.
touch /etc/apt/sources.list
if [ "$1" = "new" ]; then
	sed 's/^\([^#]\)/#\1/' /etc/apt/sources.list > /etc/apt/sources.list.new
	mv -f /etc/apt/sources.list.new /etc/apt/sources.list
fi

# Probe for cd's in the drive prior to setting up apt.
if [ "$1" = "new" ]; then
	apt-setup probe -N
else
	apt-setup probe
fi

clear