diff --git a/scripts/linuxparty.sh b/scripts/linuxparty.sh index d19abd74216ca2c1b8cc8f9da2339202f4fb2c14..854ec6bf6fcb81f5be8707b76e86a97c363255f9 100644 --- a/scripts/linuxparty.sh +++ b/scripts/linuxparty.sh @@ -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 ?" diff --git a/scripts/liprepoctl.sh b/scripts/liprepoctl.sh index 4dc6285cb3a3f321592284045b49f4edad1f024a..bb193557decfd5491c316a88d196e82f34444532 100644 --- a/scripts/liprepoctl.sh +++ b/scripts/liprepoctl.sh @@ -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