diff --git a/contrib/rootfs/offline_repo_packages b/contrib/rootfs/offline_repo_packages
new file mode 100644
index 0000000000000000000000000000000000000000..f70821480326ccd4727fba42176351139c3724c5
--- /dev/null
+++ b/contrib/rootfs/offline_repo_packages
@@ -0,0 +1,45 @@
+#Packages that should go in the offline repository.
+#Dependencies are included automatically.
+
+#Common packages
+gufw
+pwgen
+inkscape
+gimp
+subversion
+git
+graphviz
+gnome
+xubuntu-desktop
+fityk
+openssh-server
+linux-firmware-nonfree
+zsh
+zsh-doc
+lftp
+gddrescue
+
+#Physik
+liblapack-dev
+liblapack-doc
+python-numpy
+python-simpy
+python-scipy
+python-matplotlib
+ipython
+gnuplot
+wxmaxima
+root-system
+bpython
+
+#Informatik
+postgresql
+dia
+haskell-platform
+default-jdk
+swi-prolog
+
+#Mathematik
+#Singular ist nicht in den Packetquellen :-(
+#Aber wir brauchen Abhängigkeiten
+libntl0
diff --git a/scripts/fill_offline_repo.sh b/scripts/fill_offline_repo.sh
index a3f303d5123a21043f2c4538d15a9c2faa8dff1b..1f11e4b952a77c8c962984fcc2e4fd0192bfae7f 100644
--- a/scripts/fill_offline_repo.sh
+++ b/scripts/fill_offline_repo.sh
@@ -1,20 +1,61 @@
 #!/bin/bash
-PKG_LIST="gufw pwgen inkscape gimp subversion git graphviz gnome \
-xubuntu-desktop fityk openssh-server linux-firmware-nonfree zsh zsh-doc lftp gddrescue liblapack-dev liblapack-doc \
-python-numpy python-simpy python-scipy python-matplotlib ipython gnuplot wxmaxima root-system bpython \
-postgresql dia haskell-platform default-jdk swi-prolog libntl0 \
-"
 
-DESTINATION="/cdrom"
+#This file is part of lipck - the "linux install party customization kit" - and
+#contains parts of UCK - the Ubuntu Customization Kit.
+#
+# Copyright (C) 2014 Christopher Spinrath
+#
+# lipck is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# lipck is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with lipck.  If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+DESTINATION="${1:-"/cdrom"}"
+SCRIPT_DIR="/remaster"
+CONTRIB_DIR="$SCRIPT_DIR/contrib/"
+
+#source common functions (e.g. patch_all)
+if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then
+        source "$SCRIPT_DIR/scripts/common_functions.sh"
+fi
+
+if [ ! -d "$SCRIPT_DIR" ]; then
+        echo "Error: Missing remaster directory/files. Abort."
+        exit 2
+fi
+
+PKG_LIST=$(get_packages_from_file "$CONTRIB_DIR/offline_repo_packages")
+
 PKG_DESTINATION=$DESTINATION/archives
 
 #begin
 echo "creating structure..."
 mkdir -p $PKG_DESTINATION/
 echo "done."
+
+#maybe not necessary, but lets do it
+divert_initctl
+
+echo "Updating package lists..."
+apt-get update
+echo "ok."
+
 echo "downloading archives. this may take some time..."
 wget -nc -P $PKG_DESTINATION $(apt-get 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)
+
+revert_initctl
+
 echo "updating package lists..."
 apt-get update
 echo "done."