Lines 2-25
Link Here
|
2 |
|
2 |
|
3 |
. install2-init-functions |
3 |
. install2-init-functions |
4 |
|
4 |
|
|
|
5 |
|
6 |
metadir="/tmp/metadata" |
7 |
mkdir -p "$metadir" |
8 |
cp-metadata "$metadir/basesystem.manifest" || : |
9 |
|
10 |
|
5 |
METHOD="${METHOD:-cdrom}" |
11 |
METHOD="${METHOD:-cdrom}" |
6 |
HOST="${HOST:-}" |
12 |
HOST="${HOST:-}" |
7 |
PREFIX="${PREFIX:-}" |
13 |
PREFIX="${PREFIX:-}" |
|
|
14 |
AUTH_DATA="${LOGIN:-}" |
15 |
PASSWORD="${PASSWORD:-}" |
16 |
if [[ -n "$PASSWORD" && -n "$AUTH_DATA" ]]; then |
17 |
AUTH_DATA=$(echo "$AUTH_DATA:$PASSWORD@") |
18 |
elif [ -n "$AUTH_DATA" ]; then |
19 |
AUTH_DATA=$(echo "$AUTH_DATA@") |
20 |
fi |
21 |
|
8 |
|
22 |
|
9 |
[ "$PREFIX" != "/" ] || PREFIX= |
23 |
[ "$PREFIX" != "/" ] || PREFIX= |
10 |
|
24 |
|
11 |
image_prefix= |
25 |
image_prefix= |
12 |
case "$METHOD" in |
26 |
case "$METHOD" in |
13 |
http|ftp) |
27 |
http) |
14 |
image_prefix="$METHOD://$HOST$PREFIX" |
28 |
image_prefix="$METHOD://$HOST$PREFIX" |
15 |
;; |
29 |
;; |
|
|
30 |
ftp) |
31 |
image_prefix="$METHOD://$AUTH_DATA$HOST$PREFIX" |
32 |
;; |
16 |
cdrom|disk|nfs) |
33 |
cdrom|disk|nfs) |
17 |
image_prefix="$image_dir" |
34 |
image_prefix="$image_dir" |
18 |
;; |
35 |
;; |
19 |
esac |
36 |
esac |
20 |
|
37 |
|
21 |
metadir="/tmp/metadata" |
38 |
sed -i -r -e "s#^(.*)#$image_prefix/ALTLinux/RPMS.base/\1#" "$metadir/basesystem.manifest" || : |
22 |
|
|
|
23 |
mkdir -p "$metadir" |
24 |
cp-metadata "$metadir/basesystem.manifest" && |
25 |
sed -i -r -e "s#^(.*)#$image_prefix/ALTLinux/RPMS.base/\1#" "$metadir/basesystem.manifest" || : |