diff --git a/preseed/lip-success.sh b/preseed/lip-success.sh index fa0eb7b56a3c0ddcdee6f2952474e7330efec8fc..44f1d34c982156203567d4ebcc84d968a64439a7 100755 --- a/preseed/lip-success.sh +++ b/preseed/lip-success.sh @@ -3,11 +3,14 @@ mkdir -p /target/isodevice mount --bind /isodevice /target/isodevice mount --bind /dev /target/dev -mount --bind /proc /target/proc -mount --bind /sys /target/sys +mount -t proc /proc /target/proc +mount -t sysfs /sys /target/sys +mount --bind /tmp /target/tmp + +# Internet access in chroot +cp /etc/resolv.conf /target/etc/resolv.conf # Make sure X11 is accessible from chroot -mount --bind /tmp /target/tmp xhost + local: MPOINT=/isodevice ASKTOSKIP=yes x-terminal-emulator -e chroot /target /isodevice/scripts/linuxparty.sh diff --git a/scripts/linuxparty.sh b/scripts/linuxparty.sh index abd097cacf86233d82f30093c25c54fb42dd1dd1..1964fbd19f67761a682719a9b7baf8fd79bca019 100644 --- a/scripts/linuxparty.sh +++ b/scripts/linuxparty.sh @@ -22,11 +22,13 @@ if [ "$GUI" == "none" ]; then fi MY_DIR="$( readlink -f "$( dirname "${BASH_SOURCE[0]}" )" )" -HIVE_DIR="$MY_DIR/../hive/" #we assume here that the LIP install stick is mounted at /media/MultiBoot... better idea? #images already installed # TODO: include libreoffice-common (for documentation)? -PREINSTALLED_PKGS="thunderbird vlc x2goclient p7zip-full unrar-free kile vim htop git gparted" +PREINSTALLED_PKGS="thunderbird vlc kile" + +#APT_ARGS="--quiet -y --allow-unauthenticated" +APT_ARGS="--quiet -y" #Liste, in der alle Pakete verzeichnet werden, die vom Skript tatsächlich installiert werden; Pseudo-Pakete sind "all-capital" INSTALLED_PKGS="HEADER COMMON $PREINSTALLED_PKGS" @@ -84,6 +86,7 @@ else fi fi +# deprecated preinstalledpkgs() { local pkglist=$1[@] local take="FALSE" @@ -289,10 +292,8 @@ showerr() { } trap showerr ERR -# TODO: --force-yes results in the following warning: -# W: --force-yes is deprecated, use one of the options starting with --allow instead. apt-install() { - apt-get install --quiet -y --force-yes $@ + apt-get install ${APT_ARGS} $@ INSTALLED_PKGS="$INSTALLED_PKGS $@" } @@ -312,62 +313,6 @@ install_if() { install_pkgs "Pakete für Informatiker/Programmierung installieren?" "Programme, die der OSAK/die ALUG für sinnvoll hält, sind bereits zur Installation vorselektiert.\nWenn du keine Pakete aus der Liste installieren willst, einfach Abbrechen.\nBitte beachten: Das LIP-Script deinstalliert keine Pakete, insbesondere also keine Pakete die in einem früheren Lauf aktiv waren,\nund diesmal nicht ausgewählt sind!" IF_PKGS "INFORMATIK" } -install_anaconda() { - if [ ! -d "$HIVE_DIR" ] - then - err "Hive konnte nicht gefunden werden ( kein LIP-Stick? ). Ohne Hive kann Anaconda leider nicht installiert werden!" - else - ANACONDA_DIR=/opt/anaconda - ARCH="$(uname -m)" - INSTALLER="$HIVE_DIR"/anaconda/Installer- - if [ "$ARCH" == "x86_64" ]; then - INSTALLER="${INSTALLER}64Bit" - else - INSTALLER="${INSTALLER}32Bit" - fi - - INSTALLER="${INSTALLER}.sh" - echo "Benutze Anaconda-Installer: $INSTALLER ." - if [ -d "$ANACONDA_DIR" ]; then - if askyesno "Anaconda ist anscheinend schon installiert. Neuinstallieren?"; then - echo "Entferne alte Installation..." - rm -R "$ANACONDA_DIR" - echo "ok" - else - echo "Installation von Anaconda wird abgebrochen..." - return 0 - fi - fi - - if [ -f "$HIVE_DIR"/anaconda/LICENSE.txt ] && ! (ask_license "$HIVE_DIR"/anaconda/LICENSE.txt); then - echo "Lizenz nicht akzeptiert. Anaconda wird nicht installiert." - return 0 - fi - - bash $INSTALLER -b -p "$ANACONDA_DIR" - if [ $? -ne 0 ]; then - err "Der Anaconda-Installer hat versagt... ." - return 1 - fi - - echo "Installiere Qt-Version-Fix-Wrapper" - mkdir -p "$ANACONDA_DIR"/lipbin - cp "$HIVE_DIR"/anaconda/anaconda_wrapper.sh "$ANACONDA_DIR"/lipbin - cp "$HIVE_DIR"/anaconda/qt.conf "$ANACONDA_DIR"/bin - - pushd "$ANACONDA_DIR"/bin > /dev/null - find -type f -executable -exec bash -c 'FILE={}; ln -s '$ANACONDA_DIR'/lipbin/anaconda_wrapper.sh '$ANACONDA_DIR'/lipbin/$FILE; chmod +x $FILE' \; - popd > /dev/null - - echo "Registriere Anaconda in \$PATH" - pushd / > /dev/null - patch -p1 < "$HIVE_DIR/anaconda/envpatch.patch" - popd > /dev/null - - INSTALLED_PKGS="$INSTALLED_PKGS anaconda" - ok "Anaconda wurde anscheinend erfolgreich installiert!" - fi -} create_doc() { @@ -407,7 +352,7 @@ create_doc() cp "${WORKING_DIR}/DOCUMENTATION.gen.pdf" "/home/$line/Deine-LIP-Dokumentation.pdf" done RC=$? - pressenter "Eine Dokumentation der von dir installierten Paktete wurde in deinem Benutzerverzeichnis als 'Deine-LIP-Dokumentation.pdf' abgelegt." + pressenter "Eine Dokumentation der von dir installierten Pakete wurde in deinem Benutzerverzeichnis als 'Deine-LIP-Dokumentation.pdf' abgelegt." return $RC } @@ -420,7 +365,21 @@ echo echo "Auf dem Install-USB-Stick liegen viele der zu installierenden Pakete" 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." +echo "Sonst muss aus dem Internet heraus installiert werden. Das ist langsam, geht aber auch." + +# Make sure that RWTH update server ist listed in the packages sources +if grep -q 'halifax' /etc/apt/sources.list +then +else + source /etc/lsb-release + newsourcefile=$(mktemp) + echo "deb http://ftp.halifax.rwth-aachen.de/ubuntu/ $DISTRIB_CODENAME main restricted universe multiverse +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ $DISTRIB_CODENAME-security main restricted universe multiverse +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ $DISTRIB_CODENAME-updates main restricted universe multiverse +" > $newsourcefile + cat /etc/apt/sources.list >> $newsourcefile + mv $newsourcefile /etc/apt/sources.list +fi HAVELIPSTICK=0 #Offline-Repo einbinden @@ -462,8 +421,8 @@ echo "Nutze Pakete vom USB-Repository" 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 -o Dir::Etc::SourceList=/etc/apt/sources.list.d/lipoffline.list,Dir::Etc::SourceParts="" update + apt-get update fi if [ -n "$ASKTOSKIP" ]; then @@ -471,11 +430,11 @@ if [ -n "$ASKTOSKIP" ]; then fi pressenter "Im folgenden werden Aktualisierungen installiert. Dies wird einige Minuten dauern." -echo "Installiere updates (hoffentlich vom USB-Repo)" -apt-get upgrade --quiet -y --force-yes +echo "Installiere Updates (hoffentlich vom USB-Repo)" +apt-get upgrade ${APT_ARGS} echo "Installiere Standard-Programme" -apt-get install --quiet -y --force-yes $(grep '^[^|#]*D[^|]*|' "$MY_DIR/../packages" | cut -d'|' -f 2) +apt-get 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 ?" @@ -484,9 +443,9 @@ then fi echo "Installation:" -echo "Programme, die für alle Fachrichtungen interressant sind (7zip, gimp, git, ... )" +echo "Programme, die für alle Fachrichtungen interessant sind (7zip, gimp, git, ... )" if [ -z "$NOGUI" ] || (askyesno "Sollen diese Programme installiert werden ?"); then - install_common + install_common fi #Fachrichtung wählen @@ -495,27 +454,17 @@ echo "Auswahl fachspezifischer Software:" if askyesno "Software für Vorlesung 'Programmierung' (Pflicht für Informatiker) installieren ?" then - #apt-install haskell-platform java7-jdk swi-prolog - #ok "Haskell, Java, Prolog und Eclipse wurden installiert" install_if fi if askyesno "Software für Mathematiker installieren ?" then - #apt-install haskell-platform java7-jdk swi-prolog - #ok "Haskell, Java, Prolog und Eclipse wurden installiert" install_m fi if askyesno "Software für Physiker (Python-SciPy,-NumPy,diverse Plot-Programme) installieren ?" then - #apt-install python-numpy python-simpy python-scipy python-matplotlib ipython python-dev gnuplot wxmaxima - #ok "Python-SciPy, -NumPy, -Matplotlib, ipython, gnuplot, und WxMaxima wurden installiert" install_ph - #if askyesno "Anaconda installieren (für die DV Vorlesung in der Physik) ?" - #then - # install_anaconda - #fi fi echo diff --git a/scripts/mount-stick-repo.sh b/scripts/mount-stick-repo.sh index 02e1b3794bf6fd651aa423cbe180010d073f0eee..6cf4f99c2eb8803900a31bc569da999756b22971 100644 --- a/scripts/mount-stick-repo.sh +++ b/scripts/mount-stick-repo.sh @@ -21,7 +21,7 @@ while [ -z "$DEV" ]; do "Stick ist jetzt gesteckt") DEV="$(blkid -t "LABEL=$LIPSTICK_LABEL" -o device | head -n1 || echo '')" if [ -z "$DEV" ]; then - DEV="$(blkid -t "LABEL=$LIPSTICK_LABEL_ALT" -o device | head -n1 || echo '')" + DEV="$(blkid -t "LABEL=$LIPSTICK_LABEL_ALT" -o device | head -n1 || echo '')" fi ;; "Ohne Stick weitermachen") @@ -54,6 +54,6 @@ else # MPOINT="$(dbus-send --print-reply=literal --system --dest=org.freedesktop.UDisks2 /org/freedesktop/UDisks2/block_devices/${DEVFILE} org.freedesktop.DBus.Properties.Get string:'org.freedesktop.UDisks2.Filesystem' string:'MountPoints' | tail -n +3 | tr -d "\ \]\[" | head -n 1 | xxd -r -p)" MPOINT="$(udisksctl info --block-device "$DEV" | grep "MountPoints:" | tr -d ' ' | cut -d ':' -f2)" - echo "Der Stick it als '$MPOINT' gemountet" + echo "Der Stick ist als '$MPOINT' gemountet" fi #end;