diff --git a/shellscripte/usbrepo/linuxparty.sh b/shellscripte/usbrepo/linuxparty.sh index 22b6b6146b3dcab21888a10390def474f1057f15..e738aa3b2790a9699bf4816c10c91d2b4be57cb9 100644 --- a/shellscripte/usbrepo/linuxparty.sh +++ b/shellscripte/usbrepo/linuxparty.sh @@ -75,25 +75,18 @@ showerr() { } trap showerr ERR -# System absichern -if askyesno "Netzwerk: Soll die Ubuntu Firewall (ufw/gufw) aktiviert werden ?" -then - $DEBUG ufw enable - apt-get --quiet install -y gufw - ok "Firewall aktiviert, benutze 'gufw' oder 'ufw' um die Einstellungen der Firewall zu verändern" - #ok "Firewall aktiviert, benutze das Kommando 'ufw' in einem Teminal, um die Einstellungen der Firewall zu verändern" -fi - echo echo "Auf dem Install-USB-Stick liegen viele der zu installierenden Packete" bright "Es ist dringend empfohlen, jetzt einen Instaĺl-USB-Stick einzustecken" echo echo "Sonst muß aus dem Internet heraus installiert werden. Das ist langsam, geht aber auch." - -if "$MY_DIR/infuse_offline_repo.sh" +HAVELIPSTICK=0 +#Offline-Repo einbinden +if bash "$MY_DIR/infuse_offline_repo.sh" then HAVELIPSTICK=1 + ok "USB-Repository gefunden und eingebunden" else if [[ $? -eq 2 ]] then @@ -108,14 +101,43 @@ else fi fi +# Packetquellen bereitlegen. + echo + echo "Bereitstellung der Packequellen" +# Entweder apt-get update +# Oder apt-clone restore +if [[ $HAVELIPSTICK -eq 1 ]] +then + echo "Bereite apt-clone vor" + dpkg -GERi "/var/cache/apt/archives/dpkg-early-install" >/dev/null 2>&1 + APT_CLONE_BACKUP="$(mktemp --tmpdir="$HOME" --suffix='.apt-clone.tar.gz')" + echo "Erstelle Backup der apt Packetquellen in ${APT_CLONE_BACKUP}" + apt-clone clone "${APT_CLONE_BACKUP}" >/dev/null 2>&1 + echo "Wende apt-clone an" + apt-clone restore "/var/cache/apt/archives/apt-clones/ftp-halifax.apt-clone.tar.gz" >/dev/null 2>&1 || true +else + echo "Update der Packetquellen aus dem Internet mit 'apt-get update'" + # Wie sichert man apt-get update ab ? + apt-get update +fi + +# System absichern +if askyesno "Netzwerk: Soll die Ubuntu Firewall (ufw/gufw) aktiviert werden ?" +then + $DEBUG ufw enable + apt-get install --quiet -y gufw + ok "Firewall aktiviert, benutze 'gufw' oder 'ufw' um die Einstellungen der Firewall zu verändern" + #ok "Firewall aktiviert, benutze das Kommando 'ufw' in einem Teminal, um die Einstellungen der Firewall zu verändern" +fi + echo echo "Installation:" echo "Programme, die für alle Fachrichtungen interressant sind (VPN, ... )" if askyesno "Sollen diese Programme installiert werden ?" then - apt-get -y --quiet install ubuntu-restricted-extras + apt-get install --quiet -y ubuntu-restricted-extras ok "Codec Installation abgeschlossen" - apt-get install pwgen p7zip-full + apt-get install --quiet -y pwgen p7zip-full ok "Installation der System-Utilities abgeschlossen" apt-get install --quiet -y network-manager-vpnc-gnome ok "Installation des RWTH-VPNs (vpnc) abgeschlossen" @@ -144,33 +166,20 @@ fi echo echo "Auswahl fachspezifischer Software:" -( # Diese Subshell setzt PS3 nur lokal -PS3="Deine Auswahl [1,2,3]<Enter>: " -select fach in "Vorlesung 'Programmierung' (Pflicht für Informatiker)" "Physik" "<keine Spezial-Software installieren>" -do - case "$fach" in - "") - echo "Bitte wähle entsprechend deiner Fachrichtung eine Zahl von 1 bis 4 aus, tippe sie ein und drücke dann <Enter>" - ;; - Informatik*) - apt-get --quiet install -y haskell-platform java7-jdk swi-prolog - ok "Haskell, Java, Prolog und Eclipse wurden installiert" - break - ;; - Physik) - apt-get --quiet install -y python-numpy python-simpy python-scipy python-matplotlib ipython python-dev gnuplot wxmaxima kmplot - ok "Python-SciPy, -NumPy, -Matplotlib, ipython, gnuplot, WxMaxima und KMplot wurden installiert" - break - ;; - "<keine Spezial-Software installieren>") - break - ;; - esac -done -) +if askyesno "Software für Vorlesung 'Programmierung' (Pflicht für Informatiker) installieren ?" +then + apt-get install --quiet -y haskell-platform java7-jdk swi-prolog + ok "Haskell, Java, Prolog und Eclipse wurden installiert" +fi + +if askyesno "Software für Physiker (Python-SciPy,-NumPy,diverse Plot-Programme) installieren ?" +then + apt-get install --quiet -y python-numpy python-simpy python-scipy python-matplotlib ipython python-dev gnuplot wxmaxima kmplot + ok "Python-SciPy, -NumPy, -Matplotlib, ipython, gnuplot, WxMaxima und KMplot wurden installiert" +fi echo -echo "Wenn Du Software für eine weitere Fachrichung installieren möchtest, starte $0 erneut." +echo "Falls Du doch noch mehr Software installieren möchtest, starte $0 erneut." echo PKGS_EXTRA="openssh-server linux-firmware-nonfree fish rxvt-unicode vim zsh zsh-doc imagemagick lftp moc nethack-console scrot sl tmux xcowsay cowsay graphviz" diff --git a/shellscripte/usbrepo/mount-stick-repo.sh b/shellscripte/usbrepo/mount-stick-repo.sh index 25218b5f22811789bb625c40b8657efb553d46f1..5e779d60ac4b1338ea7145c8b41c7f3835e7b435 100644 --- a/shellscripte/usbrepo/mount-stick-repo.sh +++ b/shellscripte/usbrepo/mount-stick-repo.sh @@ -2,7 +2,7 @@ set -e #find device -DEV="$(blkid -t "LABEL=MultiBoot" -o device || echo '')" +DEV="$(blkid -t "LABEL=MultiBoot" -o device | head -n1 || echo '')" PS3="[1,2,3]<Enter>: " while [ -z "$DEV" ]; do @@ -13,7 +13,7 @@ while [ -z "$DEV" ]; do "Installation abbrechen" ; do case $i in "Stick ist jetzt gesteckt") - DEV="$(blkid -t "LABEL=MultiBoot" -o device || echo '')" + DEV="$(blkid -t "LABEL=MultiBoot" -o device | head -n1 || echo '')" ;; "Ohne Stick weitermachen") DEV='-nomount-'