View | Details | Raw Unified | Return to bug 34062
Collapse All | Expand All

(-)a/branches/ucs-3.2/ucs-3.2-0/base/univention-installer/scripts/14_sources_list.sh (-16 / +23 lines)
 Lines 31-36    Link Here 
31
# <http://www.gnu.org/licenses/>.
31
# <http://www.gnu.org/licenses/>.
32
32
33
# update progress message
33
# update progress message
34
die () { echo "$*" >&2 ; exit 2 ; }
34
. /tmp/progress.lib
35
. /tmp/progress.lib
35
echo "__MSG__:$(LC_ALL=$INSTALLERLOCALE gettext "Configuring basesystem")" >&9
36
echo "__MSG__:$(LC_ALL=$INSTALLERLOCALE gettext "Configuring basesystem")" >&9
36
37
 Lines 39-64   mkdir -m 0755 -p /instmnt/sourcedevice Link Here 
39
## check for repository structure
40
## check for repository structure
40
# old repository (DVD)
41
# old repository (DVD)
41
if [ -d /mnt/packages ]; then
42
if [ -d /mnt/packages ]; then
42
	cat >/instmnt/etc/apt/sources.list <<__EOT__
43
	echo '#UCS Installation'
43
#UCS Installation
44
	echo 'deb file:/sourcedevice/packages ./'
44
45
deb file:/sourcedevice/packages ./
46
__EOT__
47
else
45
else
48
    version=`cat /mnt/.univention_install | grep VERSION | sed -e 's|VERSION=||'`
46
	echo '#UCS Installation'
47
	. /mnt/.univention_install || die "Failed to read .univention_installer"
48
	major=${VERSION%.*} minor=${VERSION#*.}
49
49
50
    repo_dir="file:/sourcedevice/mirror/${version}/maintained/ ${version}-0"
50
	case "$(uname -m)" in
51
	cat >/instmnt/etc/apt/sources.list <<__EOT__
51
	i686) ARCH=i386 ;;
52
#UCS Installation
52
	x86_64) ARCH=amd64 ;;
53
	*) die "Unknown architecture" ;;
54
	esac
53
55
54
deb $repo_dir/all/
56
	while [ $minor -ge 0 ]
55
__EOT__
57
	do
56
	for arch in i386 amd64 extern; do
58
		for dir in "/mnt/mirror/${major}.${minor}/maintained/${major}.${minor}-"[0-9]*
57
		if [ -d "/mnt/mirror/${version}/maintained/${version}-0/$arch" ]; then
59
		do
58
			echo "deb $repo_dir/$arch/" >> /instmnt/etc/apt/sources.list
60
			for arch in all "$ARCH"
59
		fi
61
			do
62
				[ -d "$dir/$arch" ] &&
63
					echo "deb file:/sourcedevice/mirror/${major}.${minor}/maintained ${d##*/maintained/}/$arch/"
64
			done
65
		done
66
		minor=$((minor - 1))
60
	done
67
	done
61
fi
68
fi >/instmnt/etc/apt/sources.list
62
69
63
chmod 644 /instmnt/etc/apt/sources.list
70
chmod 644 /instmnt/etc/apt/sources.list
64
rm -Rf /instmnt/etc/apt/sources.list.d
71
rm -Rf /instmnt/etc/apt/sources.list.d

Return to bug 34062