Skip to content
Snippets Groups Projects
Commit a00c331a authored by Daniel Schulte's avatar Daniel Schulte
Browse files

Merge branch 'master' of www.fsmpi.rwth-aachen.de:lip

parents 44c285b7 5d6e57f9
Branches
No related tags found
Loading
#!/bin/bash
PKG_LIST="linux-firmware-nonfree swi-prolog cowsay fish get-flash-videos gnome haskell-platform java7-jdk imagemagick rxvt-unicode moc nethack-console scrot sl tmux vim xcowsay zsh zsh-doc texmaker gimp pidgin smplayer subversion git lftp inkscape"
DESTINATION="/isodevice"
SECTIONNAME=lipoffline
ARCHITECTURE=$1
ARCHIVE_DESTINATION=$DESTINATION/archives
REL_DISTS_PATH=dists/main/$SECTIONNAME/binary-$ARCHITECTURE
PKG_DESTINATION=$ARCHIVE_DESTINATION/$REL_DISTS_PATH
#begin
echo "creating structure..."
mkdir -p $PKG_DESTINATION/
echo "done."
echo "downloading archives. this may take some time..."
wget -nc -P $PKG_DESTINATION $(apt-get -o APT::Architecture=$ARCHITECTURE install --reinstall --print-uris -qq $PKG_LIST | cut -d"'" -f2)
#wget -nc -P $PKG_DESTINATION $(apt-get -o APT::Architecture=$ARCHITECTURE install --reinstall --allow-unauthenticated --print-uris -qq $PKG_LIST | cut -d"'" -f2)
echo "done."
echo "creating meta files..."
cd $ARCHIVE_DESTINATION
apt-ftparchive packages $REL_DISTS_PATH > $REL_DISTS_PATH/Packages
gzip $REL_DISTS_PATH/Packages
echo "done."
#!/bin/bash
PKG_LIST="cowsay fish get-flash-videos gnome haskell-platform java7-jdk imagemagick rxvt-unicode moc nethack-console scrot sl tmux vim xcowsay zsh zsh-doc texmaker gimp pidgin smplayer subversion git lftp inkscape"
source mount-stick-repo.sh #detect mountpoint
if [ -n $MPOINT ]; then
SOURCE_PATH="$MPOINT"
#check if we have root perms?
MERGE_DIR=$(mktemp -d)
CACHE_DIR="/var/cache/apt/archives/"
ARCH="i386"
if [ "$(uname -m)" = "x86_64" ]; then
ARCH="amd64"
fi
OVERLAY_DIR="$SOURCE_PATH/archives/dists/main/lipoffline/binary-$ARCH/"
echo "Detected architecture $ARCH -> overlay dir is $OVERLAY_DIR"
# test if there is already an overlayfs at CACHE_DIR
if [ "$(stat --format %m "$CACHE_DIR")" = "${CACHE_DIR%/}" ]
then
echo "The Overlayfs is already there. Using it."
else
echo "Making an overlay FS with your repository."
mkdir -p "$MERGE_DIR"
mount -t overlayfs -o "rw,lowerdir=$OVERLAY_DIR,upperdir=$CACHE_DIR" overlayfs "$MERGE_DIR"
mount --move "$MERGE_DIR" "$CACHE_DIR"
rmdir "$MERGE_DIR"
fi
else
echo "No stick, no repo; good luck."
fi
apt-get install $APT_OPTIONS $PKG_LIST #exec lip install script here?
#end;
#! /bin/bash
#find device
DEV="$(blkid -t "LABEL=MultiBoot" -o device)"
while [ -z "$DEV" ]; do
echo "Der LIP-Install-USB-Stick wurde nicht gefunden."
echo "Jetzt einstecken oder ohne Weitermachen"
select i in "Stick ist jetzt gesteckt" \
"Ohne Stick Weitermachen" \
"Installation abbrechen" ; do
case $i in
"Stick ist jetzt gesteckt")
DEV="$(blkid -t "LABEL=MultiBoot" -o device)"
;;
"Ohne Stick Weitermachen")
DEV='-nomount-'
;;
"Installation abbrechen")
exit 0
;;
*)
echo "Das sollte nicht passieren. Helfer fragen."
exit 99
;;
esac
break
done
done
if [ "$DEV" = "-nomount-" ]; then
echo "Mache ohne USB-Stick weiter."
MPOINT=""
#exit 0
else
echo "Stick gefunden als $DEV"
# ask udisks to mount it always.
udisks --mount "$DEV"
# see where it is mounted
DEVFILE=${DEV#/dev/}
MPOINT="$(qdbus --system org.freedesktop.UDisks /org/freedesktop/UDisks/devices/${DEVFILE} org.freedesktop.DBus.Properties.Get org.freedesktop.UDisks.Device "DeviceMountPaths" | head -n1)"
echo "Der Stick it 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