e52e21781f
See http://www.opennet.ru/openforum/vsluhforumID3/86239.html#1 for a query that has led to this one; in particular, - xdm dropped (won't log in root and there are no users yet); - network is brought up and configured via DHCP by default; - apt-get works out-of-box; - default image size is twice the chroot size.
21 lines
643 B
Bash
Executable File
21 lines
643 B
Bash
Executable File
#!/bin/sh
|
|
# enable online repos if possible, just quit if anything's wrong
|
|
|
|
repo_source='/etc/apt/sources.list.d/alt.list'
|
|
host='http://ftp.altlinux.org'
|
|
|
|
[ -s "$repo_source" ] || exit 0
|
|
|
|
# regexps from alterator-pkg (via installer-feature-online-repo)
|
|
prefix_re="[[:space:]]*rpm[[:space:]]\+\([^[:space:]]\+[[:space:]]\+\)\?"
|
|
updates_re="${prefix_re}http:\/\/\([^[:space:]]\+\)[[:space:]]*"
|
|
|
|
# architectures
|
|
host_arch="$(rpm --eval '%_host_cpu')"
|
|
[ "$host_arch" = "x86_64" ] && compat="x86_64-i586" || compat=
|
|
|
|
# turn on unconditionally
|
|
for arch in "$host_arch" noarch "$compat"; do
|
|
sed -i "s/^#\($updates_re$arch\)/\1/" "$repo_source"
|
|
done
|