Skip to content
Snippets Groups Projects
Commit b7b2943e authored by Valentin Bruch's avatar Valentin Bruch
Browse files

tried to fix offline repo

don't forget to switch off offline repo when installation is cancelled;
make sure offline repo is used by default if available;
use halifax server as backup if packages are not in offline repo
parent 751814b8
No related branches found
No related tags found
No related merge requests found
......@@ -293,7 +293,7 @@ showerr() {
trap showerr ERR
apt-install() {
apt-get install ${APT_ARGS} $@
apt-get ${APT_SOURCE_ARG} install ${APT_ARGS} $@
INSTALLED_PKGS="$INSTALLED_PKGS $@"
}
......@@ -401,6 +401,13 @@ else
fi
fi
if [ -e /etc/apt/sources.list.d/lipoffline.list ]
then
APT_SOURCE_ARG='-o Dir::Etc::SourceList=/etc/apt/sources.list.d/lipoffline.list'
else
APT_SOURCE_ARG='-o Dir::Etc::SourceList=/etc/apt/sources.list'
fi
# Paketquellen bereitlegen.
echo
echo "Bereitstellung der Paketquellen"
......@@ -421,19 +428,23 @@ else
#echo "Update der Paketquellen aus dem Internet mit 'apt-get update'"
# Wie sichert man apt-get update ab ?
# apt-get -o Dir::Etc::SourceList=/etc/apt/sources.list.d/lipoffline.list,Dir::Etc::SourceParts="" update
apt-get update
apt-get ${APT_SOURCE_ARG} update
fi
if [ -n "$ASKTOSKIP" ]; then
askyesno "Möchtest du an dieser Stelle Aktualisierungen und spezielle Software für dein Studium installieren (empfohlen)?" || exit 0
if ! askyesno "Möchtest du an dieser Stelle Aktualisierungen und spezielle Software für dein Studium installieren (empfohlen)?"
then
bash $MY_DIR/liprepoctl.sh off
exit 0
fi
fi
pressenter "Im folgenden werden Aktualisierungen installiert. Dies wird einige Minuten dauern."
echo "Installiere Updates (hoffentlich vom USB-Repo)"
apt-get upgrade ${APT_ARGS}
apt-get ${APT_SOURCE_ARG} upgrade ${APT_ARGS}
echo "Installiere Standard-Programme"
apt-get install ${APT_ARGS} $(grep '^[^|#]*D[^|]*|' "$MY_DIR/../packages" | cut -d'|' -f 2)
apt-get ${APT_SOURCE_ARG} install ${APT_ARGS} $(grep '^[^|#]*D[^|]*|' "$MY_DIR/../packages" | cut -d'|' -f 2)
# System absichern
if askyesno "Netzwerk: Soll die Ubuntu Firewall (ufw/gufw) aktiviert werden ?"
......
......@@ -2,6 +2,7 @@
ACTION="$1"
FILENAME="/etc/apt/sources.list.d/lipoffline.list"
ONLINEFILENAME="/etc/apt/sources.list.d/liponline.list"
ACTIVATED=`test -e "$FILENAME"`
. /etc/lsb-release
......@@ -12,11 +13,14 @@ function install_repo()
{
echo "# offline repository of the linux install party
deb [ arch=amd64 trusted=yes ] file://$1/archives-$DIST_CODENAME $DIST_CODENAME lip" > "$FILENAME"
echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ impish main restricted universe multiverse
deb http://ftp.halifax.rwth-aachen.de/ubuntu/ impish-security main restricted universe multiverse
deb http://ftp.halifax.rwth-aachen.de/ubuntu/ impish-updates main restricted universe multiverse" > "$ONLINEFILENAME"
}
function uninstall_repo()
{
rm -f "$FILENAME"
rm -f "$FILENAME" "$ONLINEFILENAME"
}
case $ACTION in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment