summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/selfstrap17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/selfstrap b/src/selfstrap
index f379525..7f331e9 100755
--- a/src/selfstrap
+++ b/src/selfstrap
@@ -1,5 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2debian_mirror=http://httpredir.debian.org/debian 2debian_mirror=http://httpredir.debian.org/debian
3debian_security_mirror=http://security.debian.org
3EXTRA_PACKAGES='apt debian-archive-keyring locales' 4EXTRA_PACKAGES='apt debian-archive-keyring locales'
4 5
5die() { printf 'Error: %s\n' "$*"; exit 1; } 6die() { printf 'Error: %s\n' "$*"; exit 1; }
@@ -187,13 +188,21 @@ populate_rootfs()
187 [ -e "$TARGET/usr/bin/awk" -o -L "$TARGET/usr/bin/awk" ] || ln -s mawk "$TARGET/usr/bin/awk" 188 [ -e "$TARGET/usr/bin/awk" -o -L "$TARGET/usr/bin/awk" ] || ln -s mawk "$TARGET/usr/bin/awk"
188 189
189 write_lines_once "$TARGET"/var/lib/dpkg/arch "$target_arch" 190 write_lines_once "$TARGET"/var/lib/dpkg/arch "$target_arch"
190 write_lines_once "$TARGET"/etc/apt/sources.list \ 191 write_sources_list
191 "deb $debian_mirror $target_release main contrib non-free" \
192 "deb http://httpredir.debian.org/debian ${target_release}-backports main contrib non-free" \
193 "deb http://security.debian.org $target_release/updates main contrib non-free"
194 install_devices 192 install_devices
195} 193}
196 194
195write_sources_list()
196{
197 local dest="$TARGET"/etc/apt/sources.list
198 [ -e "$dest" ] && return
199 printf '%s\n' \
200 "deb ${debian_mirror} ${target_release} main contrib non-free" \
201 "deb ${debian_mirror} ${target_release}-backports main contrib non-free" \
202 "deb ${debian_security_mirror} ${target_release}/updates main contrib non-free" |
203 column -t > "$dest"
204}
205
197parse_apt_simul_line() 206parse_apt_simul_line()
198{ 207{
199 set -- $* 208 set -- $*