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

make linuxparty.sh available without offline repo

Internet access for linuxparty.sh in chroot;
Add halifax server to packages sources at beginning of linuxparty.sh;
Spelling corrections in some scripts
parent 092e10d2
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......@@ -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,7 +443,7 @@ 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
fi
......@@ -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
......
......@@ -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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment