pax_global_header00006660000000000000000000000064114603030710014505gustar00rootroot0000000000000052 comment=67ac55b5c2bd4c482001142e7a1d428a54aaab02 installer-feature-online-repo-0.2/000075500000000000000000000000001146030307100172175ustar00rootroot00000000000000installer-feature-online-repo-0.2/.gear-rules000064400000000000000000000000071146030307100212630ustar00rootroot00000000000000tar: . installer-feature-online-repo-0.2/80-online-repo.sh000075500000000000000000000015701146030307100222350ustar00rootroot00000000000000#!/bin/sh a= . install2-init-functions internet='no' host='http://ftp.altlinux.org' # regexps from alterator-pkg prefix_re="[[:space:]]*rpm[[:space:]]\+\([^[:space:]]\+[[:space:]]\+\)\?" updates_re="${prefix_re}http:\/\/\([^[:space:]]\+\)[[:space:]]*" repo_source='/etc/apt/sources.list.d/alt.list' repo_on() { for arch in "$(rpm --eval '%_host_cpu')" noarch do run_chroot sed "s/^#\(${updates_re}${arch}\)/\1/" -i $repo_source run_chroot grep "^${updates_re}${arch}" $repo_source done } repo_off() { for arch in "$(rpm --eval '%_host_cpu')" noarch do run_chroot sed "s/^\(${updates_re}${arch}\)/#\1/" -i $repo_source done } # Detect working Internet connection curl --connect-timeout 10 "$host" >/dev/null 2>&1 && internet='yes' # Make online repositories available if test "$internet" = "yes" -a -f "$repo_source" then echo "Enable online repositories" repo_on fi installer-feature-online-repo-0.2/installer-feature.spec000064400000000000000000000016351146030307100235260ustar00rootroot00000000000000Name: installer-feature-online-repo Version: 0.2 Release: alt1 Summary: Make online repositories available License: GPL Group: System/Configuration/Other Url: http://www.altlinux.org/Installer/beans BuildArch: noarch Packager: Andrey Cherepanov Source: %name-%version.tar %description Make online repositories available Requires: chrooted %prep %setup %install %define hookdir %_datadir/install2/postinstall.d mkdir -p %buildroot%hookdir install -pm755 *.sh %buildroot%hookdir/ %files %hookdir/* %changelog * Fri Oct 22 2010 Andrey Cherepanov 0.2-alt1 - use curl instead chrooted ping for network availability - use http:// instead of ftp:// sources because somebody have passive mode * Tue Feb 09 2010 Andrey Cherepanov 0.1-alt2 - fix hook directory - fix network detection * Wed Feb 03 2010 Andrey Cherepanov 0.1-alt1 - initial version