summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot2014-06-30 15:21:04 +0200
committerroot2014-06-30 15:21:04 +0200
commit9aabe45d6e2865dcc95e4a6f5823c9310904b1e9 (patch)
tree2b53f43e95d3944b73864f4e5995a75ab42a61b0
downloadsetup-scripts-9aabe45d6e2865dcc95e4a6f5823c9310904b1e9.tar.gz
setup-scripts-9aabe45d6e2865dcc95e4a6f5823c9310904b1e9.tar.xz
setup-scripts-9aabe45d6e2865dcc95e4a6f5823c9310904b1e9.zip
[SSPS] Satellite server preparation script. Further heavy debugging needed -
this is just the first checkin after tidying to server as a starting point.
-rw-r--r--satellit_installer/includes/10-configurations.inc68
-rw-r--r--satellit_installer/includes/10-handle_mysql.inc80
-rw-r--r--satellit_installer/includes/10-handle_users.inc31
-rwxr-xr-xsatellit_installer/includes/10-install_packages.inc21
-rw-r--r--satellit_installer/includes/10-purge_install.inc46
-rwxr-xr-xsatellit_installer/includes/10-query_user.inc76
-rw-r--r--satellit_installer/includes/10-script_dropper.inc105
-rw-r--r--satellit_installer/includes/10-set_motd.inc9
-rw-r--r--satellit_installer/includes/10-sudo_config.inc20
-rwxr-xr-xsatellit_installer/includes/10-uninstall_packages.inc20
-rw-r--r--satellit_installer/includes/20-prerequisites.inc25
-rw-r--r--satellit_installer/includes/30-setup_dhcp.inc31
-rw-r--r--satellit_installer/includes/50-install_bwSuite_server.inc26
-rw-r--r--satellit_installer/includes/50-install_taskmanager.inc9
-rw-r--r--satellit_installer/includes/90-set_directory_permissions.inc22
-rwxr-xr-xsatellit_installer/satellit_installer137
-rw-r--r--satellit_installer/static_files/db_bwLehrpool_dump.sql527
-rw-r--r--satellit_installer/static_files/db_openslx_dump.sql282
-rwxr-xr-xsatellit_installer/static_files/dmsd.sh4
-rw-r--r--satellit_installer/static_files/finish_setup_public_key.pem14
-rw-r--r--satellit_installer/static_files/lighttpd.conf31
-rw-r--r--satellit_installer/static_files/new_passwords.encryptedbin0 -> 512 bytes
-rw-r--r--satellit_installer/static_files/taskmanager-init-cron7
-rwxr-xr-xsatellit_installer/static_files/taskmanager.sh4
24 files changed, 1595 insertions, 0 deletions
diff --git a/satellit_installer/includes/10-configurations.inc b/satellit_installer/includes/10-configurations.inc
new file mode 100644
index 0000000..f68ac5a
--- /dev/null
+++ b/satellit_installer/includes/10-configurations.inc
@@ -0,0 +1,68 @@
+unpack_tar_gz() {
+ echo
+ echo -n "# Unpacking given tar file $1, using extra options $2 ..."
+ tar xzf "$1" $2
+ ERR=$?
+ if [ "$ERR" -ne 0 ]; then
+ echo
+ echo "# Could not unpack tar file $1!"
+ # Fehlerbehandlung?
+ else
+ echo "ok."
+ fi
+}
+
+patch_pureftpd_config() {
+ # $1: user, $2: database, $3: Password
+ echo -n "# Patching pureftpd configuration..."
+ cp -p /etc/pure-ftpd/db/mysql.conf /etc/pure-ftpd/db/mysql.conf.$(date +%Y%m%d%H%M%S)
+ sed -i "s/MYSQLUser.*$/MYSQLUser $1/g" /etc/pure-ftpd/db/mysql.conf
+ sed -i "s/MYSQLPassword.*$/MYSQLPassword $3/g" /etc/pure-ftpd/db/mysql.conf
+ sed -i "s/MYSQLDatabase.*$/MYSQLDatabase $2/g" /etc/pure-ftpd/db/mysql.conf
+ echo "ok."
+}
+
+patch_atftpd_config() {
+ echo -n "# Stopping atftpd server in case it's not managed by inetd..."
+ /etc/init.d/atftpd stop 2>/dev/null 1>&2
+ echo "ok."
+ # No sense in patching, we will drop this little entry.
+ echo -n "# Patching atftpd configuration..."
+ echo "USE_INETD=false" > /etc/default/atftpd
+ echo 'OPTIONS="--retry-timeout 1 --maxthread 100 --verbose=5 --no-multicast --bind-address 0.0.0.0 /srv/openslx/tftp"' >> /etc/default/atftpd
+ echo "ok."
+ echo -n "# Starting atftpd server..."
+ /etc/init.d/atftpd start 2>/dev/null 1>&2
+ echo "ok."
+}
+
+patch_lighttpd_config() {
+ echo -n "# Stopping lighttpd server..."
+ /etc/init.d/lighttpd stop 2>/dev/null 1>&2
+ echo "ok."
+ echo -n "# Patching lighttpd configuration..."
+ cp -p /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.$(date +%Y%m%d%H%M%S)
+ cp -p "$BASEDIR/static_files/lighttpd.conf" /etc/lighttpd/lighttpd.conf
+ echo "ok."
+ cd /etc/lighttpd/conf-enabled
+ [ ! -h 10-fastcgi.conf ] && ln -s ../conf-available/10-fastcgi.conf
+ [ ! -h 15-fastcgi-php.conf ] && ln -s ../conf-available/15-fastcgi-php.conf
+ echo -n "# Starting lighttpd server..."
+ mkdir -p "$1" 2>/dev/null
+ /etc/init.d/lighttpd start 2>/dev/null 1>&2
+ cd -
+ echo "ok."
+}
+
+config_nfs() {
+ echo -n "# Patching /etc/exports for NFS... "
+ if [ $(grep -c "/srv/openslx/nfs" /etc/exports) -gt 0 ]; then
+ echo -n "NFS entry already there; doing nothing."
+ else
+ echo '/srv/openslx/nfs *(ro,async,insecure,no_root_squash,no_subtree_check)' >> /etc/exports
+ echo "ok."
+ fi
+ mkdir -p /srv/openslx/nfs 2>/dev/null
+ chown bwlehrpool:images /srv/openslx/nfs
+ chmod 775 /srv/openslx/nfs
+}
diff --git a/satellit_installer/includes/10-handle_mysql.inc b/satellit_installer/includes/10-handle_mysql.inc
new file mode 100644
index 0000000..5191d08
--- /dev/null
+++ b/satellit_installer/includes/10-handle_mysql.inc
@@ -0,0 +1,80 @@
+preset_mysql_root() {
+ # Presetting a root password for mysql so installer keeps quiet:
+ echo "Presetting root password for mysql: $MYSQL_ROOT_PASS"
+ debconf-set-selections <<< "mysql-server mysql-server/root_password password $MYSQL_ROOT_PASS"
+ debconf-set-selections <<< "mysql-server mysql-server/root_password_again password $MYSQL_ROOT_PASS"
+}
+
+mysql_add_db() {
+ echo -n "# Creating mysql database $1..."
+ echo "create database $1;" | mysql -u root -p"$MYSQL_ROOT_PASS"
+ ERR=$?
+ if [ "$ERR" -ne 0 ]; then
+ echo
+ echo "# Could not create mysql database $1!"
+ # Fehlerbehandlung?
+ else
+ echo "ok."
+ fi
+}
+
+mysql_delete_db() {
+ # $1 database; $2 password
+ echo -n "# Deleting mysql database $1..."
+ echo "drop database if exists $1;" | mysql -u root -p${2}
+ ERR=$?
+ if [ "$ERR" -ne 0 ]; then
+ echo "# Could not delete mysql user $1!"
+ # Fehlerbehandlung?
+ else
+ echo "ok."
+ fi
+
+}
+
+mysql_add_user() {
+ # $1=user, $2=database, $3=privileges, $4=password
+ local TEMPFILE=$(mktemp "$BASEDIR"/temp/mysql_useradd_XXXXX.sql)
+ echo -n "# Adding user $1 for database $2, privileges $3..."
+ echo "CREATE USER $1@'localhost' IDENTIFIED BY '$4';" > "$TEMPFILE"
+ echo "GRANT $3 ON $2.* TO '$1'@'localhost';" >> "$TEMPFILE"
+
+ mysql -u root -p"$MYSQL_ROOT_PASS" < "$TEMPFILE"
+ ERR=$?
+ if [ "$ERR" -ne 0 ]; then
+ echo
+ echo "# Could not add mysql user $1!"
+ # Fehlerbehandlung?
+ else
+ echo "ok."
+ fi
+ rm -f "$TEMPFILE"
+}
+
+mysql_delete_user() {
+ # $1: mysql user, $2 password
+ echo -n "# Deleting mysql user $1..."
+ echo "drop user $1@localhost;" | mysql -u root -p${2}
+ ERR=$?
+ if [ "$ERR" -ne 0 ]; then
+ echo "# Could not delete mysql user $1!"
+ # Fehlerbehandlung?
+ else
+ echo "ok."
+ fi
+}
+
+mysql_import_dump() {
+ # $1: dump file, $2: database
+ echo -n "# Importing sql dump file $1..."
+ mysql -u root -p"$MYSQL_ROOT_PASS" -h localhost "$2" < "$1"
+ ERR=$?
+ if [ "$ERR" -ne 0 ]; then
+ echo
+ echo
+ echo "# Could not import sql dump file $1!"
+ # Fehlerbehandlung?
+ else
+ echo "ok."
+ fi
+}
diff --git a/satellit_installer/includes/10-handle_users.inc b/satellit_installer/includes/10-handle_users.inc
new file mode 100644
index 0000000..79ad9eb
--- /dev/null
+++ b/satellit_installer/includes/10-handle_users.inc
@@ -0,0 +1,31 @@
+add_group() {
+ echo -n "# Adding group: $1, gid $2..."
+ groupadd -g "$2" "$1" 2>/dev/null || echo "Could not add group $1 / gid $2!"
+ echo "ok."
+}
+
+add_user() {
+ echo -n "# Adding user: $1, uid $2, to gid $3..."
+ useradd -u "$2" -m -d /home/"$1" -s /bin/bash -g "$3" "$1" 2>/dev/null \
+ || echo "Could not add user ${1}/${2} / gid $3!"
+ echo "ok."
+}
+
+
+kill_user() {
+ echo -n "# Terminating user account id $1, leaving user home/files as they were: "
+ userdel $(getent passwd "$1" | cut -f 1 -d ":") || echo "# could not kill userid ${1}!"
+ echo "ok."
+}
+
+check_users() {
+ echo "#"
+ echo "# Checking for users to kill with id>=1000: "
+ for userid in $(cat /etc/passwd|cut -f 3 -d ":"|sort -n); do
+ case $userid in
+ 65534) echo "# Ignoring user 65534/sync." ;;
+ *) [ "$userid" -ge 1000 ] && kill_user "$userid"
+ esac
+ done
+}
+
diff --git a/satellit_installer/includes/10-install_packages.inc b/satellit_installer/includes/10-install_packages.inc
new file mode 100755
index 0000000..2201b64
--- /dev/null
+++ b/satellit_installer/includes/10-install_packages.inc
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+install_packages() {
+ local NEEDED_PACKAGES="$1"
+
+ echo "#"
+ echo "# Installing packages. This may take a while."
+ echo "#"
+ for PACKAGE in $NEEDED_PACKAGES; do
+ echo -n "# Installing package $PACKAGE... "
+ apt-get -qq -y install ${PACKAGE} 2>/dev/null 1>&2
+ ERR=$?
+ if [ "$ERR" -ne 0 ]; then
+ echo "# Could not install package $PACKAGE!"
+ # Weitere Fehlerbehandlung folgt
+ else
+ echo "ok."
+ fi
+ done
+}
+
diff --git a/satellit_installer/includes/10-purge_install.inc b/satellit_installer/includes/10-purge_install.inc
new file mode 100644
index 0000000..921ae11
--- /dev/null
+++ b/satellit_installer/includes/10-purge_install.inc
@@ -0,0 +1,46 @@
+read_password() {
+ MYSQL_ROOT_PASS="$(grep MYSQL_ROOT_PASS "$LOGDIR/config"|cut -f 2 -d "=")" 2>/dev/null
+ MYSQL_ROOT_PASS_OLD="$(grep MYSQL_ROOT_PASS "$LOGDIR/config.prerun" | cut -f 2 -d "=")" 2>/dev/null
+}
+
+purge_install() {
+ echo "# Purging install (This is only to be used within development!)..."
+ echo "# Purging installed packages..."
+ uninstall_packages "$PACKAGELIST_SERVER"
+ uninstall_packages "$PACKAGELIST_SCRIPT"
+
+# read_password
+# echo "# Deleting mysql databases openslx and bwLehrpool..."
+# for db in openslx bwLehrpool; do
+# mysql_delete_db "$db" "$MYSQL_ROOT_PASS"
+# if [ "$ERR" -ne 0 ]; then
+# echo -n "# Retrying: "
+# mysql_delete_db "$user" "$MYSQL_ROOT_PASS_OLD"
+# if [ "$ERR" -ne 0 ]; then
+# KILLALL=true
+# fi
+# fi
+# done
+#
+# echo "# Deleting mysql users openslx and bwLehrpool..."
+# for user in openslx bwLehrpool; do
+# mysql_delete_user "$user" "$MYSQL_ROOT_PASS"
+# if [ "$ERR" -ne 0 ]; then
+# echo -n "# Retrying: "
+# mysql_delete_user "$user" "$MYSQL_ROOT_PASS_OLD"
+# if [ "$ERR" -ne 0 ]; then
+# KILLALL=true
+# fi
+# fi
+# done
+
+# # Brutalinski user and database dropping:
+# if [ "$KILLALL" == "true" ]; then
+ echo "#"
+ echo "# Killing databases by force."
+ echo "#"
+ rm -rf /var/lib/mysql 2>/dev/null
+# fi
+
+ killall mysqld 2>/dev/null 1>&2
+}
diff --git a/satellit_installer/includes/10-query_user.inc b/satellit_installer/includes/10-query_user.inc
new file mode 100755
index 0000000..d6a3f00
--- /dev/null
+++ b/satellit_installer/includes/10-query_user.inc
@@ -0,0 +1,76 @@
+query_single_password() {
+ ANSWER_OK=false
+ while [ "$ANSWER_OK" != "true" ]; do
+ read -s -p "# Please enter password (Note: Password will not be shown): " PASS1
+ echo
+ read -s -p "# Please enter password again: " PASS2
+ echo
+ if [[ "$PASS1" == "$PASS2" && "$PASS1" != "" ]]; then
+ ANSWER_OK=true
+ else
+ echo "# Password mismatch or password empty!"
+ echo "#"
+ fi
+ echo "#"
+ echo "# By the way, the cracklib password checker says: $(echo "$PASS1" | cracklib-check | cut -f 2- -d " ")."
+ done
+
+}
+
+query_passwords() {
+ ANSWER_OK=n
+ while [ "$ANSWER_OK" != "y" ]; do
+ echo "#"
+ echo "# Please enter appropriate passwords."
+ echo "#"
+ echo "# We will setup an user called 'openslx', so we need a password."
+ echo "# This user is just a non-root system user for menial tasks."
+ query_single_password
+ OPENSLX_PASS="$PASS1"
+ echo "#"
+ echo "# We do also need a password for mysql's root user."
+ echo "# This user will be needed for database installation etc, but not for daily work."
+ query_single_password
+ MYSQL_ROOT_PASS="$PASS1"
+ echo "#"
+ echo '# We will setup a mysql user "openslx", so we need another password.'
+ echo "# This is the database user for the satellite configuration admin interface."
+ query_single_password
+ MYSQL_OPENSLX_PASS="$PASS1"
+ echo "#"
+ echo "# Now, on to the needed mysql user 'bwLehrpool' - you guessed it; we need a password."
+ echo "# This user will be the work horse for the bwLehrpool Suite database."
+ query_single_password
+ MYSQL_BWLEHRPOOL_PASS="$PASS1"
+ echo "#"
+ echo -n "# Everything in order? Please press 'y' to continue; any other key to re-enter passwords: "
+ read -p "" -n1 -s ANSWER_OK
+ echo "$ANSWER_OK"
+ done
+ # Activate this only for debugging purposes...
+ # echo "OPENSLX_PASS=$OPENSLX_PASS" >> "$LOGDIR"/config
+ # echo "MYSQL_ROOT_PASS=$MYSQL_ROOT_PASS" >> "$LOGDIR"/config
+ # echo "MYSQL_OPENSLX_PASS=$MYSQL_OPENSLX_PASS" >> "$LOGDIR"/config
+ # echo "MYSQL_BWLEHRPOOL_PASS=$MYSQL_BWLEHRPOOL_PASS" >> "$LOGDIR"/config
+}
+
+generate_password() {
+ local password="$(< /dev/urandom tr -dc A-Za-z0-9_ | head -c${1:-16};)"
+ echo "$password"
+}
+
+# This routine has to be used only in conjunction with the prepare_firstrun-script, which
+# will enforce the setting of good passwords on first root login after server start.
+set_passwords() {
+ echo -n "# Setting passwords..."
+ OPENSLX_PASS="$(generate_password)"
+ # BWLEHRPOOL_PASS="$(generate_password)"
+ MYSQL_ROOT_PASS="$(generate_password)"
+ MYSQL_OPENSLX_PASS="$(generate_password)"
+ MYSQL_BWLEHRPOOL_PASS="$(generate_password)"
+ echo "OPENSLX_PASS=$OPENSLX_PASS" > "$LOGDIR"/config
+ echo "MYSQL_ROOT_PASS=$MYSQL_ROOT_PASS" >> "$LOGDIR"/config
+ echo "MYSQL_OPENSLX_PASS=$MYSQL_OPENSLX_PASS" >> "$LOGDIR"/config
+ echo "MYSQL_BWLEHRPOOL_PASS=$MYSQL_BWLEHRPOOL_PASS" >> "$LOGDIR"/config
+ echo "ok."
+}
diff --git a/satellit_installer/includes/10-script_dropper.inc b/satellit_installer/includes/10-script_dropper.inc
new file mode 100644
index 0000000..efe1a53
--- /dev/null
+++ b/satellit_installer/includes/10-script_dropper.inc
@@ -0,0 +1,105 @@
+patch_bashrc() {
+ if [ $(grep -c $(echo "^${INSTALLDIR}.*first_run") /root/.bashrc) -gt 0 ]; then
+ echo "# first_run script already in root's bashrc, doing nothing."
+ else
+ echo "# Patching root's bashrc...) "
+ echo "${INSTALLDIR}/first_run" >> /root/.bashrc
+ fi
+}
+
+copy_public_key() {
+ cp -p "${BASEDIR}/static_files/finish_setup_public_key.pem" ${INSTALLDIR} \
+ || echo "Warning: Could not copy public key to ${INSTALLDIR}!"
+}
+
+drop_script() {
+ cat >"${INSTALLDIR}/first_run"<<-EOF
+ #!/bin/bash
+
+ generate_password() {
+ local password="\$(< /dev/urandom tr -dc _A-Za-z0-9 | head -c${1:-16};)"
+ echo "\$password"
+ }
+
+ LANG=en_US.UTF-8
+ echo
+ echo "Satellite server install post-install script"
+ echo
+ echo "This script will set safe password for root, the mysql root user"
+ echo 'and two mysql user accounts (openslx and bwLehrpool).'
+ echo
+ echo "We recommend you choose a secure password for root. The other"
+ echo "passwords will be auto generated."
+ echo ""
+ echo "Please set a secure password for root:"
+ echo ""
+ passwd
+ echo
+ echo "Thank you."
+ echo
+ echo "Now we will auto-generate new passwords for the mentioned mysql users:"
+ echo
+ MYSQL_ROOT_PASS="\$(grep MYSQL_ROOT_PASS "$LOGDIR/config"|cut -f 2 -d "=")"
+ umask 0066
+
+ MYSQL_ROOT_NEW=\$(generate_password)
+ mysqladmin -u root -p\${MYSQL_ROOT_PASS} password \${MYSQL_ROOT_NEW}
+ echo "MYSQL_ROOT_PASS=\$MYSQL_ROOT_NEW" > /root/new_passwords
+ echo "Mysql root password,"
+
+ MYSQL_BWLEHRPOOL_NEW=\$(generate_password)
+ echo "SET PASSWORD FOR 'bwLehrpool'@'localhost' = PASSWORD('\$MYSQL_BWLEHRPOOL_NEW');" | mysql -u root -p\${MYSQL_ROOT_NEW}
+ echo "MYSQL_BWLEHRPOOL_PASS=\$MYSQL_BWLEHRPOOL_NEW" >> /root/new_passwords
+ echo "Mysql bwLehrpool password,"
+
+ MYSQL_OPENSLX_NEW=\$(generate_password)
+ echo "SET PASSWORD FOR 'openslx'@'localhost' = PASSWORD('\$MYSQL_OPENSLX_NEW');" | mysql -u root -p\${MYSQL_ROOT_NEW}
+ echo "MYSQL_OPENSLX_PASS=\$MYSQL_OPENSLX_NEW" >> /root/new_passwords
+ echo "and mysql openslx password."
+
+ echo "... done."
+ echo
+ echo "Now we will save the newly set passwords in an encrypted file..."
+
+ cat /root/new_passwords | openssl rsautl -encrypt -pubin -inkey ${BASEDIR}/static_files/finish_setup_public_key.pem > \
+ ${BASEDIR}/static_files/new_passwords.encrypted
+ rm -f /root/new_passwords 2>/dev/null
+ echo "...ok."
+
+ # Patching openslx-mysql-userpass into bwSuite Server config:
+ sed -i "s/pass=%MYSQL_BWLEHRPOOL_PASS%/pass=\$MYSQL_BWLEHRPOOL_NEW/g" "$INSTALLDIR/Server_Config.ini"
+
+ # Patching openslx-mysql-userpass into bwSuite Server config:
+ sed -i "s/%MYSQL_OPENSLX_PASS%/\$MYSQL_OPENSLX_NEW/g" "/srv/openslx/www/slxadmin/config.php"
+
+ # inittab-entry dmsd:
+ if [ \$(grep -c "dmsd.*respawn" /etc/inittab) -gt 0 ]; then
+ echo "bwLehrpool Suite inittab entry detected, doing nothing. "
+ else
+ echo -n "bwLehrpool Suite: patching inittab..."
+ echo "dmsd:2345:respawn:$INSTALLDIR/dmsd.sh" >> /etc/inittab
+ echo "ok."
+ fi
+
+ # inittab-entry taskmanager:
+ if [ \$(grep -c "taskmanager.*respawn" /etc/inittab) -gt 0 ]; then
+ echo "Taskmanager inittab entry detected, doing nothing."
+ else
+ echo -n "bwLehrpool Suite: patching inittab..."
+ echo "taskmanager:2345:respawn:$TASKMANDIR/taskmanager.sh" >> /etc/inittab
+ echo "ok."
+ fi
+
+ echo "Last thing to is to delete the script starter from root's .bashrc..."
+ sed -i "/first_run/d" /root/.bashrc
+ echo "...done."
+
+ EOF
+ chmod u+x ${INSTALLDIR}/first_run
+}
+
+script_dropper () {
+ copy_public_key
+ patch_bashrc
+ drop_script
+}
diff --git a/satellit_installer/includes/10-set_motd.inc b/satellit_installer/includes/10-set_motd.inc
new file mode 100644
index 0000000..769ebb3
--- /dev/null
+++ b/satellit_installer/includes/10-set_motd.inc
@@ -0,0 +1,9 @@
+set_motd() {
+ if [ ! -f /etc/motd.orig ]; then
+ cp -p /etc/motd /etc/motd.orig
+ fi
+
+ echo "" > /etc/motd
+ echo "Welcome to the openSLX-NG Satellite server (bwLehrpool Suite)" >> /etc/motd
+ echo "" >> /etc/motd
+}
diff --git a/satellit_installer/includes/10-sudo_config.inc b/satellit_installer/includes/10-sudo_config.inc
new file mode 100644
index 0000000..e952bc7
--- /dev/null
+++ b/satellit_installer/includes/10-sudo_config.inc
@@ -0,0 +1,20 @@
+sudo_config() {
+
+ TM_SUDO_CONF="/etc/sudoers.d/taskmanager"
+
+ if [ ! -e "${TM_SUDO_CONF}" ]; then
+ # generate it
+ cat > "${TM_SUDO_CONF}" <<-EOF
+ # Sudoers configuration for user 'taskmanager'
+ # Auto-generated on: $(date)
+ taskmanager ALL=(root) NOPASSWD: /sbin/reboot
+ taskmanager ALL=(ldadp) NOPASSWD: /opt/taskmanager/scripts/ldadp-launcher
+ taskmanager ALL=(root) NOPASSWD: /opt/taskmanager/scripts/mount-store
+ EOF
+
+ chmod 0440 "${TM_SUDO_CONF}" || \
+ echo "# Could not set perms of '${TM_SUDO_CONF}' to 0440!"
+ else
+ echo "# File ${TM_SUDO_CONF} exists!"
+ fi
+}
diff --git a/satellit_installer/includes/10-uninstall_packages.inc b/satellit_installer/includes/10-uninstall_packages.inc
new file mode 100755
index 0000000..fb7e146
--- /dev/null
+++ b/satellit_installer/includes/10-uninstall_packages.inc
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# This is only meant for development purposes!
+
+uninstall_packages() {
+ local NEEDED_PACKAGES="$1"
+
+ echo "Uninstall packages..."
+ for PACKAGE in $NEEDED_PACKAGES; do
+ echo "Purging package $PACKAGE..."
+ apt-get -qq purge "${PACKAGE}" 2>/dev/null 1>&2
+ ERR=$?
+ if [ "$ERR" -ne 0 ]; then
+ echo "Could not purge package $PACKAGE!"
+ # Weitere Fehlerbehandlung folgt
+ fi
+ done
+ apt-get -qq autoremove 2>/dev/null 1>&2
+}
+
diff --git a/satellit_installer/includes/20-prerequisites.inc b/satellit_installer/includes/20-prerequisites.inc
new file mode 100644
index 0000000..687b613
--- /dev/null
+++ b/satellit_installer/includes/20-prerequisites.inc
@@ -0,0 +1,25 @@
+prerequisites() {
+ mkdir -p -m 700 "$BASEDIR"/config # No point in testing.
+ mkdir -p -m 700 "$BASEDIR"/temp
+
+ # Old debugging config file there?
+ [ -f "$LOGDIR/config" ] && cp -p "$LOGDIR/config" "$LOGDIR/config.prerun" 2>/dev/null
+
+ # Let's look whether an english locale is alread active (we choose en_US.UTF-8)
+ if [[ $(grep "en_US.UTF-8" /etc/locale.gen|cut -f 1 -d " ") == "#" ]]; then
+ echo "# Generating an english locale (UTF-8)..."
+ # Backing up never hurts:
+ cp -p /etc/locale.gen /etc/locale.gen.orig
+ # Now patch the localization file:
+ sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen
+ dpkg-reconfigure locales
+ else
+ echo "# English locale detected; all is well."
+ fi
+}
+
+preset_mysql_root() {
+ # Presetting a root password for mysql so installer keeps quiet:
+ debconf-set-selections <<< "mysql-server mysql-server/root_password password $MYSQL_ROOT_PASS"
+ debconf-set-selections <<< "mysql-server mysql-server/root_password_again password $MYSQL_ROOT_PASS"
+}
diff --git a/satellit_installer/includes/30-setup_dhcp.inc b/satellit_installer/includes/30-setup_dhcp.inc
new file mode 100644
index 0000000..0d13705
--- /dev/null
+++ b/satellit_installer/includes/30-setup_dhcp.inc
@@ -0,0 +1,31 @@
+setup_dhcp() {
+ # First: let's see whether the package isc-dhcp-client is installed
+ # (we do not like it due to udp checksum failures using virtIO)
+ echo "# Checking dhcp configuration / utilities..."
+ if [ $(which dhclient) ]; then
+ echo -n "# dhclient detected. Uninstalling package isc-dhcp-client..."
+ dpkg --purge isc-dhcp-client
+ ERR=$?
+ if [ "$ERR" -ne 0 ]; then
+ echo
+ echo "# WARNING: Could not uninstall isc-dhcp-client (dhclient)!"
+ echo "# Trying to install pump anyway, but make sure"
+ echo "# pump is functional!"
+ else
+ echo " ok."
+ fi
+ fi
+
+ if [ ! $(which pump) ]; then
+ echo -n "# Installing pump..."
+ apt-get install pump
+ if [ "$ERR" -ne 0 ]; then
+ echo
+ echo "# WARNING: Could install isc-dhcp-client (dhclient)!"
+ echo "# Trying to install pump anyway, but make sure"
+ echo "# pump is functional!"
+ else
+ echo " ok."
+ fi
+ fi
+}
diff --git a/satellit_installer/includes/50-install_bwSuite_server.inc b/satellit_installer/includes/50-install_bwSuite_server.inc
new file mode 100644
index 0000000..a237ee4
--- /dev/null
+++ b/satellit_installer/includes/50-install_bwSuite_server.inc
@@ -0,0 +1,26 @@
+config_bwSuite_server() {
+ # $1: Path to server directory
+ echo -n "# Writing configuration for bwSuite server..."
+ echo "[ftp]" > "$1/Server_Config.ini"
+ echo "path_absolute=/srv/openslx/nfs/" >> "$1/Server_Config.ini"
+ echo >> "$1/Server_Config.ini"
+ echo "[sql]" >> "$1/Server_Config.ini"
+ echo "connection=localhost/bwLehrpool" >> "$1/Server_Config.ini"
+ echo "pass=%MYSQL_BWLEHRPOOL_PASS%" >> "$1/Server_Config.ini"
+ echo "user=bwLehrpool" >> "$1/Server_Config.ini"
+ chown bwlehrpool:root "$1/Server_Config.ini"
+ echo "ok."
+}
+
+install_bwSuite_server() {
+ # $1: directory to install server to
+ echo -n "# Installing server part of bwSuite... "
+ mkdir -p "$1" 2>/dev/null
+ cp -p "$BASEDIR/static_files/dmsd.sh" "$1"
+ cp -p "$BASEDIR/static_files/bwLehrpoolSuite_Server.jar" "$1/bwLehrpoolSuite_Server.jar"
+ echo "ok."
+
+ echo -n "# Installing server part of bwSuite... "
+ config_bwSuite_server "$1"
+ echo "ok."
+}
diff --git a/satellit_installer/includes/50-install_taskmanager.inc b/satellit_installer/includes/50-install_taskmanager.inc
new file mode 100644
index 0000000..0ccfbb0
--- /dev/null
+++ b/satellit_installer/includes/50-install_taskmanager.inc
@@ -0,0 +1,9 @@
+install_taskmanager() {
+ # $1: directory to install server to
+ echo -n "# Installing taskmanager... "
+ mkdir -p "$1" 2>/dev/null
+ cp -p "$BASEDIR/static_files/taskmanager.sh" "$1"
+ # cp -p "$BASEDIR/static_files/Taskmanager.jar" "$1/Taskmanager.jar"
+ unpack_tar_gz "$BASEDIR/static_files/taskmanager.tar.gz" "-C $1"
+ cp "$BASEDIR/static_files/taskmanager-init-cron" /etc/cron.d/
+}
diff --git a/satellit_installer/includes/90-set_directory_permissions.inc b/satellit_installer/includes/90-set_directory_permissions.inc
new file mode 100644
index 0000000..9b87488
--- /dev/null
+++ b/satellit_installer/includes/90-set_directory_permissions.inc
@@ -0,0 +1,22 @@
+# Here is the place to (recursively) set directory and/or file permissions.
+# This is some kind of a stop gap to be sure permissions are set rightly,
+# as sometimes eg. archives wield not the desired permissions.
+
+set_directory_permissions() {
+ mkdir -p -m 755 /opt/openslx 2>/dev/null
+ chown -R taskmanager:taskmanager "$OPENSLXDIR"/configs
+ chown -R taskmanager:www-data /opt/openslx/ipxe
+
+ mkdir -p -m 755 /srv/openslx/www 2>/dev/null
+ chmod -R 755 /srv/openslx 2>/dev/null
+ chown -R www-data:taskmanager /srv/openslx/www
+ chown -R taskmanager:www-data /srv/openslx/www/boot
+
+ mkdir -p -m 755 /srv/openslx 2>/dev/null
+ chown -R taskmanager:root /srv/openslx/tftp
+ mkdir -p -m 755 /opt/ldadp 2>/dev/null
+ mkdir -p -m 750 /opt/ldadp/configs 2>/dev/null
+ mkdir -p -m 755 /opt/ldadp/pid 2>/dev/null
+ chown -R taskmanager:ldadp "/opt/ldadp/configs"
+ chown -R ldadp:root "/opt/ldadp/configs"
+}
diff --git a/satellit_installer/satellit_installer b/satellit_installer/satellit_installer
new file mode 100755
index 0000000..c560b50
--- /dev/null
+++ b/satellit_installer/satellit_installer
@@ -0,0 +1,137 @@
+#!/bin/bash
+
+# set -x
+
+# This script tries to install a bwLehrpool satellite server in a (hopefully)
+# automatic fashion. It is only verified to work on a Debian 7.x distribution.
+# While it may work on any recent Debian-derived distribution this is not
+# guaranteed in any way.
+#
+# If there were any errors in running this script do the following steps to
+# re-install:
+# 1. Un-outcomment the call to purge_install near the end of this script.
+# 2. re-run the script; ignore any errors like "ERROR 1045 (28000): Access
+# denied for user 'root'@'localhost'". This is caused by mysql root password
+# mismatch; it will vanish on the second run. purge_install will uninstall
+# the packages given in PACKAGELIST_SERVER _and_ purge their configuration.
+# 3. re-run the script again; then the mysql root password will be set to the
+# queried password entry. Then the mysql databases and users will be deleted.
+# 4. Out-comment the call to purge_install and run the script again for a clean
+# install.
+# This cumbersome way will be remedied in the future.
+
+echo "#"
+echo "# bwSuite Server and environment autoinstaller"
+echo "#"
+
+# Set and save some environmental variables:
+OLDUMASK=$(umask)
+OLD_DEBIAN_FRONTEND="$DEBIAN_FRONTEND"
+umask 0066 # in case we write something.
+
+export SELF="$(readlink -f "$0")"
+export BASEDIR="$(dirname "${SELF}")"
+export LOGDIR="$BASEDIR/config"
+export INSTALLDIR="/opt/dmsd/"
+export TASKMANDIR="/opt/taskmanager/"
+export OPENSLXDIR="/opt/openslx/"
+USERKILL=""
+export DEBIAN_FRONTEND=noninteractive # Part of keepeng apt quiet
+export LANG=en_US.UTF-8
+
+#
+#
+# TRAPPING hierhin!
+#
+#
+
+# Set list of needed packages (scripting needs) - remember, Debian-specific so far.
+PACKAGELIST_SCRIPT="cracklib-runtime vim"
+
+# Set list of needed packages (server needs) - remember, Debian-specific so far.
+PACKAGELIST_SERVER="mysql-server lighttpd pure-ftpd-mysql atftpd php5-cgi php5-curl cifs-utils"
+PACKAGELIST_SERVER+=" sudo php5-common php5-mysqlnd openjdk-7-jre-headless nfs-kernel-server nfs-common pump"
+PACKAGELIST_SERVER+=" nfs-common pump"
+
+# First, to include includes include them:
+for INCLUDE in "$BASEDIR"/includes/*.inc; do
+ echo "# Sourcing $INCLUDE..."
+ source "$INCLUDE"
+done
+
+####### Main program #######
+
+install_packages "$PACKAGELIST_SCRIPT" # Packages needed for script
+setup_dhcp # dhcp: no dhclient but pump
+prerequisites # config directory, locales
+
+# query_passwords
+set_passwords # only to be used within certain circumstances -
+ # see includes/query_user.
+
+preset_mysql_root # so mysqld keeps quiet when installing
+install_packages "$PACKAGELIST_SERVER" # Packages needed for server
+
+check_users # Meet interesting users with uid>=1000 and kill them.
+ # user 65534/sync will be ignored.
+add_group openslx 1000
+add_group taskmanager 1001
+add_group ldadp 1002
+add_group images 12345
+add_user openslx 1000 1000
+add_user taskmanager 1001 1001
+add_user bwlehrpool 10001 12345
+add_user ldadp 1002 1002
+
+# Adding sudo config for user taskmanager:
+sudo_config
+
+# Now comes mysql stuff; adding databases:
+mysql_add_db openslx
+mysql_add_db bwLehrpool
+# $1=user, $2=database, $3=privileges, $4=password
+mysql_add_user bwLehrpool bwLehrpool "DELETE, INSERT, SELECT, UPDATE" "$MYSQL_BWLEHRPOOL_PASS"
+mysql_add_user openslx openslx ALL "$MYSQL_OPENSLX_PASS"
+# $1=sql-dumpfile, $2=database
+mysql_import_dump "$BASEDIR/static_files/db_bwLehrpool_dump.sql" bwLehrpool
+mysql_import_dump "$BASEDIR/static_files/db_openslx_dump.sql" openslx
+
+
+# $1: tar.gz-file, $2: option for unpacking base dir
+unpack_tar_gz "$BASEDIR/static_files/ftp-config.tar.gz" "-C /"
+
+# $1: user, $2: database, $3: Password
+patch_pureftpd_config bwLehrpool bwLehrpool "$MYSQL_BWLEHRPOOL_PASS"
+patch_atftpd_config
+# $1: lighttpd http root
+patch_lighttpd_config /srv/openslx/www
+
+install_bwSuite_server /opt/dmsd
+
+install_taskmanager /opt/taskmanager
+
+unpack_tar_gz "$BASEDIR/static_files/openslx.tar.gz" "-C $OPENSLXDIR"
+unpack_tar_gz "$BASEDIR/static_files/openslx_www.tar.gz" "-C /srv/openslx/www"
+unpack_tar_gz "$BASEDIR/static_files/openslx_tftp.tar.gz" "-C /srv/openslx"
+unpack_tar_gz "$BASEDIR/static_files/ldadp.tgz" "-C /opt/ldadp"
+
+set_directory_permissions
+
+# NFS server configuration:
+config_nfs
+
+# This part drops a script and anchors it's execution within root's bashrc:
+script_dropper
+
+# Change motd to something openslx-ng-ier...
+set_motd
+
+# Activate 'purge_install' here - but be careful!
+#
+# purge_install
+
+
+
+# umask $OLDUMASK
+
+exit 0
diff --git a/satellit_installer/static_files/db_bwLehrpool_dump.sql b/satellit_installer/static_files/db_bwLehrpool_dump.sql
new file mode 100644
index 0000000..3eb7054
--- /dev/null
+++ b/satellit_installer/static_files/db_bwLehrpool_dump.sql
@@ -0,0 +1,527 @@
+-- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (i686)
+--
+-- Host: localhost Database: bwLehrpool
+-- ------------------------------------------------------
+-- Server version 5.5.35-0+wheezy1
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `FtpUsers`
+--
+
+DROP TABLE IF EXISTS `FtpUsers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `FtpUsers` (
+ `User` varchar(16) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
+ `Password` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
+ `Uid` int(11) NOT NULL DEFAULT '-1',
+ `Gid` int(11) NOT NULL DEFAULT '-1',
+ `Dir` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
+ `CreationDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`User`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `FtpUsers`
+--
+
+LOCK TABLES `FtpUsers` WRITE;
+/*!40000 ALTER TABLE `FtpUsers` DISABLE KEYS */;
+/*!40000 ALTER TABLE `FtpUsers` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_VLData_imageContent`
+--
+
+DROP TABLE IF EXISTS `m_VLData_imageContent`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_VLData_imageContent` (
+ `imageID` int(11) NOT NULL,
+ `imageVersion` int(11) NOT NULL,
+ `SW_ID` int(11) NOT NULL,
+ `LicenseType` int(11) NOT NULL COMMENT 'free | testVersion | Key | ownLicenseKey | licenseServer | onlyOne',
+ `licenseServerAdress` varchar(100) DEFAULT NULL,
+ `comment` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`imageID`,`imageVersion`,`SW_ID`),
+ KEY `imageID_idx` (`imageID`),
+ KEY `imageVersion_idx` (`imageVersion`),
+ KEY `SW_ID_idx` (`SW_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_VLData_imageContent`
+--
+
+LOCK TABLES `m_VLData_imageContent` WRITE;
+/*!40000 ALTER TABLE `m_VLData_imageContent` DISABLE KEYS */;
+/*!40000 ALTER TABLE `m_VLData_imageContent` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_VLData_imageInfo`
+--
+
+DROP TABLE IF EXISTS `m_VLData_imageInfo`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_VLData_imageInfo` (
+ `GUID_imageID` varchar(45) NOT NULL,
+ `imageVersion` int(11) NOT NULL,
+ `image_name` varchar(45) DEFAULT NULL,
+ `image_path` varchar(255) DEFAULT NULL,
+ `image_lastCall` datetime DEFAULT NULL,
+ `image_create_time` datetime DEFAULT NULL,
+ `image_update_time` datetime DEFAULT NULL,
+ `image_owner` varchar(45) DEFAULT NULL,
+ `image_change_by` varchar(45) DEFAULT NULL,
+ `rec_create_time` datetime DEFAULT NULL,
+ `rec_change_time` datetime DEFAULT NULL,
+ `rec_owner` varchar(45) DEFAULT NULL,
+ `rec_change_by` varchar(45) DEFAULT NULL,
+ `content_operatingSystem` int(11) DEFAULT NULL,
+ `status_isCompressed` tinyint(1) DEFAULT '0',
+ `status_isSecure` tinyint(1) DEFAULT '0',
+ `status_isOptimzed` tinyint(1) DEFAULT '0',
+ `status_isValid` tinyint(1) DEFAULT '0',
+ `status_isReady` tinyint(1) DEFAULT '0',
+ `status_isDeleted` tinyint(1) DEFAULT NULL,
+ `status_isLastOfficialVersion` tinyint(1) DEFAULT NULL COMMENT 'wird verwendet, wenn z.B. eine Lecturezeit verändert werden soll, so dass dies nur möglich ist, wenn die Lecture auch die aktuelle Version verwendet. Wenn auf eine ImageVersion keine aktive Lecture mehr verweist, kann diese gelöscht werden.',
+ `cond_hasLicenseRestriction` tinyint(1) DEFAULT '0' COMMENT 'mehrere Kategorien: 1: free; 2: UserOwnLicense; 3: licenseServer; 4: restricted; wobei als Wert immer die höherwertigste der Programmpakete genommen wird',
+ `cond_hasInternetRestriction` tinyint(1) DEFAULT '0',
+ `cond_minRAM` int(11) DEFAULT NULL,
+ `cond_minCPUs` int(11) DEFAULT NULL,
+ `image_isTemplate` varchar(45) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT 'FALSE' COMMENT 'Flag zum setzen, ob ein Image als Vorlage behandelt werden soll oder als bestehendes Labor',
+ `image_filesize` bigint(20) DEFAULT NULL,
+ `image_syncMode` enum('only_local','to_be_published','being_published','successfully_published','to_be_decentralized','being_decentralized','successfully_decentralized') NOT NULL DEFAULT 'only_local' COMMENT 'ENUM(''only_local'',''to_be_published'',''being_published'',''successfully_published'',''to_be_decentralized'',''being_decentralized'',''successfully_decentralized'')',
+ PRIMARY KEY (`GUID_imageID`,`imageVersion`),
+ KEY `userID_idx` (`image_owner`,`image_change_by`,`rec_owner`,`rec_change_by`),
+ KEY `operatingSystemID_idx` (`content_operatingSystem`),
+ KEY `GUID_imageID_idx` (`GUID_imageID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_VLData_imageInfo`
+--
+
+LOCK TABLES `m_VLData_imageInfo` WRITE;
+/*!40000 ALTER TABLE `m_VLData_imageInfo` DISABLE KEYS */;
+/*!40000 ALTER TABLE `m_VLData_imageInfo` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_VLData_lecture`
+--
+
+DROP TABLE IF EXISTS `m_VLData_lecture`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_VLData_lecture` (
+ `lectureID` varchar(45) NOT NULL,
+ `name` varchar(45) DEFAULT NULL,
+ `isActive` tinyint(1) DEFAULT NULL,
+ `startTime` datetime DEFAULT NULL,
+ `endTime` datetime DEFAULT NULL,
+ `lastUsed` datetime DEFAULT NULL,
+ `shortDescription` varchar(50) DEFAULT NULL,
+ `description` varchar(500) DEFAULT NULL,
+ `imageID` varchar(45) DEFAULT NULL,
+ `imageVersion` int(11) DEFAULT NULL,
+ `admin_createTime` datetime DEFAULT NULL,
+ `admin_changeTime` datetime DEFAULT NULL,
+ `admin_owner` varchar(45) DEFAULT NULL,
+ `admin_change_by` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`lectureID`),
+ KEY `imageID_idx` (`imageID`),
+ KEY `userID_idx` (`admin_owner`,`admin_change_by`),
+ KEY `imageVersion_idx` (`imageVersion`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_VLData_lecture`
+--
+
+LOCK TABLES `m_VLData_lecture` WRITE;
+/*!40000 ALTER TABLE `m_VLData_lecture` DISABLE KEYS */;
+/*!40000 ALTER TABLE `m_VLData_lecture` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_applicationsoftware`
+--
+
+DROP TABLE IF EXISTS `m_applicationsoftware`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_applicationsoftware` (
+ `SoftwarePackageID` int(11) NOT NULL,
+ `name` varchar(45) DEFAULT NULL,
+ `architecture` int(11) DEFAULT NULL COMMENT 'Angaben in Bit\n32 | 64',
+ `supplier` int(11) DEFAULT NULL,
+ PRIMARY KEY (`SoftwarePackageID`),
+ KEY `supplierID_idx` (`supplier`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_applicationsoftware`
+--
+
+LOCK TABLES `m_applicationsoftware` WRITE;
+/*!40000 ALTER TABLE `m_applicationsoftware` DISABLE KEYS */;
+INSERT INTO `m_applicationsoftware` VALUES (0,'Office 2010',64,1);
+/*!40000 ALTER TABLE `m_applicationsoftware` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_group`
+--
+
+DROP TABLE IF EXISTS `m_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_group` (
+ `groupID` int(11) NOT NULL,
+ `name` varchar(45) DEFAULT NULL,
+ `description` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`groupID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_group`
+--
+
+LOCK TABLES `m_group` WRITE;
+/*!40000 ALTER TABLE `m_group` DISABLE KEYS */;
+INSERT INTO `m_group` VALUES (0,'All','Enthält alle User');
+/*!40000 ALTER TABLE `m_group` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_image`
+--
+
+DROP TABLE IF EXISTS `m_image`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_image` (
+ `GUID_imageID` int(11) NOT NULL,
+ PRIMARY KEY (`GUID_imageID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_image`
+--
+
+LOCK TABLES `m_image` WRITE;
+/*!40000 ALTER TABLE `m_image` DISABLE KEYS */;
+/*!40000 ALTER TABLE `m_image` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_institution`
+--
+
+DROP TABLE IF EXISTS `m_institution`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_institution` (
+ `institutionID` varchar(50) NOT NULL,
+ `name` varchar(80) DEFAULT NULL,
+ PRIMARY KEY (`institutionID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_institution`
+--
+
+LOCK TABLES `m_institution` WRITE;
+/*!40000 ALTER TABLE `m_institution` DISABLE KEYS */;
+/*!40000 ALTER TABLE `m_institution` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_operatingSystem`
+--
+
+DROP TABLE IF EXISTS `m_operatingSystem`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_operatingSystem` (
+ `operatingSystemID` int(11) NOT NULL,
+ `name` varchar(45) DEFAULT NULL,
+ `architecture` int(11) DEFAULT NULL COMMENT 'Angaben in Bit\n32 | 64',
+ `supplier` int(11) DEFAULT NULL,
+ PRIMARY KEY (`operatingSystemID`),
+ KEY `supplierID_idx` (`supplier`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_operatingSystem`
+--
+
+LOCK TABLES `m_operatingSystem` WRITE;
+/*!40000 ALTER TABLE `m_operatingSystem` DISABLE KEYS */;
+INSERT INTO `m_operatingSystem` VALUES (0,'Windows 7',64,0),(1,'Windows 7',32,0),(2,'Windows 8.1',64,0),(3,'Windows 8.1',32,0),(4,'Ubuntu 12',64,1),(5,'Ubuntu 12',32,1),(6,'Ubuntu 13',64,1),(7,'Ubuntu 13',32,1),(8,'Ubuntu 14',64,1),(9,'Ubuntu 14',32,1),(10,'openSUSE 13',64,2),(11,'openSUSE 13',32,2);
+/*!40000 ALTER TABLE `m_operatingSystem` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_role`
+--
+
+DROP TABLE IF EXISTS `m_role`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_role` (
+ `roleID` int(11) NOT NULL,
+ `name` varchar(45) DEFAULT NULL,
+ `description` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`roleID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_role`
+--
+
+LOCK TABLES `m_role` WRITE;
+/*!40000 ALTER TABLE `m_role` DISABLE KEYS */;
+INSERT INTO `m_role` VALUES (0,'Creator','Darf die Lecture und das Image ändern');
+/*!40000 ALTER TABLE `m_role` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_supplier`
+--
+
+DROP TABLE IF EXISTS `m_supplier`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_supplier` (
+ `supplierID` int(11) NOT NULL,
+ `name` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`supplierID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_supplier`
+--
+
+LOCK TABLES `m_supplier` WRITE;
+/*!40000 ALTER TABLE `m_supplier` DISABLE KEYS */;
+INSERT INTO `m_supplier` VALUES (0,'Microsoft'),(1,'Ubuntu Foundation'),(2,'SUSE Linux GmbH');
+/*!40000 ALTER TABLE `m_supplier` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `m_user`
+--
+
+DROP TABLE IF EXISTS `m_user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `m_user` (
+ `userID` varchar(45) NOT NULL,
+ `loginName` varchar(45) DEFAULT NULL,
+ `Nachname` varchar(45) DEFAULT NULL,
+ `Vorname` varchar(45) DEFAULT NULL,
+ `mail` varchar(45) DEFAULT NULL,
+ `lastLogin` datetime DEFAULT NULL,
+ `institution` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`userID`),
+ KEY `institutionID_idx` (`institution`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `m_user`
+--
+
+LOCK TABLES `m_user` WRITE;
+/*!40000 ALTER TABLE `m_user` DISABLE KEYS */;
+/*!40000 ALTER TABLE `m_user` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `pm_VLData_image`
+--
+
+DROP TABLE IF EXISTS `pm_VLData_image`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `pm_VLData_image` (
+ `GUID` bigint(20) NOT NULL COMMENT 'GUID Typ',
+ `GUID_imageID` int(11) DEFAULT NULL,
+ `roleID` int(11) DEFAULT NULL,
+ `userID` int(11) DEFAULT NULL,
+ `groupID` int(11) DEFAULT NULL COMMENT 'es gibt eine Gruppe ALL',
+ `image_read` tinyint(1) DEFAULT NULL,
+ `image_write` tinyint(1) DEFAULT NULL,
+ `image_admin` tinyint(1) DEFAULT NULL,
+ `image_changePermission` tinyint(1) DEFAULT NULL,
+ `info_read` tinyint(1) DEFAULT NULL,
+ `info_write` tinyint(1) DEFAULT NULL,
+ `info_admin` tinyint(1) DEFAULT NULL,
+ `info_changePermission` tinyint(1) DEFAULT NULL,
+ `link_allowed` tinyint(1) DEFAULT NULL,
+ PRIMARY KEY (`GUID`),
+ KEY `GUID_imageID_idx` (`GUID_imageID`),
+ KEY `userID_idx` (`userID`),
+ KEY `roleID_idx` (`roleID`),
+ KEY `groupID_idx` (`groupID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `pm_VLData_image`
+--
+
+LOCK TABLES `pm_VLData_image` WRITE;
+/*!40000 ALTER TABLE `pm_VLData_image` DISABLE KEYS */;
+/*!40000 ALTER TABLE `pm_VLData_image` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `pm_VLData_lecture`
+--
+
+DROP TABLE IF EXISTS `pm_VLData_lecture`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `pm_VLData_lecture` (
+ `GUID` bigint(20) NOT NULL COMMENT 'GUID Typ',
+ `lectureID` int(11) DEFAULT NULL,
+ `roleID` int(11) DEFAULT NULL,
+ `userID` int(11) DEFAULT NULL,
+ `groupID` int(11) DEFAULT NULL COMMENT 'es gibt eine Gruppe ALL',
+ `rec_read` tinyint(1) DEFAULT NULL,
+ `rec_write` tinyint(1) DEFAULT NULL,
+ `rec_admin` tinyint(1) DEFAULT NULL,
+ `rec_changePermission` tinyint(1) DEFAULT NULL,
+ PRIMARY KEY (`GUID`),
+ KEY `lectureID_idx` (`lectureID`),
+ KEY `roleID_idx` (`roleID`),
+ KEY `userID_idx` (`userID`),
+ KEY `groupID_idx` (`groupID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `pm_VLData_lecture`
+--
+
+LOCK TABLES `pm_VLData_lecture` WRITE;
+/*!40000 ALTER TABLE `pm_VLData_lecture` DISABLE KEYS */;
+/*!40000 ALTER TABLE `pm_VLData_lecture` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `pm_group_role`
+--
+
+DROP TABLE IF EXISTS `pm_group_role`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `pm_group_role` (
+ `groupID` int(11) NOT NULL,
+ `roleID` int(11) NOT NULL,
+ PRIMARY KEY (`groupID`,`roleID`),
+ KEY `groupID_idx` (`groupID`),
+ KEY `roleID_idx` (`roleID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `pm_group_role`
+--
+
+LOCK TABLES `pm_group_role` WRITE;
+/*!40000 ALTER TABLE `pm_group_role` DISABLE KEYS */;
+INSERT INTO `pm_group_role` VALUES (1,1);
+/*!40000 ALTER TABLE `pm_group_role` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `pm_user_group`
+--
+
+DROP TABLE IF EXISTS `pm_user_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `pm_user_group` (
+ `userID` int(11) NOT NULL,
+ `groupID` int(11) NOT NULL,
+ PRIMARY KEY (`userID`,`groupID`),
+ KEY `userID_idx` (`userID`),
+ KEY `groupID_idx` (`groupID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `pm_user_group`
+--
+
+LOCK TABLES `pm_user_group` WRITE;
+/*!40000 ALTER TABLE `pm_user_group` DISABLE KEYS */;
+INSERT INTO `pm_user_group` VALUES (1,1);
+/*!40000 ALTER TABLE `pm_user_group` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `pm_user_role`
+--
+
+DROP TABLE IF EXISTS `pm_user_role`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `pm_user_role` (
+ `userID` int(11) NOT NULL,
+ `roleID` int(11) NOT NULL,
+ PRIMARY KEY (`userID`,`roleID`),
+ KEY `userID_idx` (`userID`),
+ KEY `roleID_idx` (`roleID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `pm_user_role`
+--
+
+LOCK TABLES `pm_user_role` WRITE;
+/*!40000 ALTER TABLE `pm_user_role` DISABLE KEYS */;
+INSERT INTO `pm_user_role` VALUES (1,1);
+/*!40000 ALTER TABLE `pm_user_role` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2014-05-26 10:27:35
diff --git a/satellit_installer/static_files/db_openslx_dump.sql b/satellit_installer/static_files/db_openslx_dump.sql
new file mode 100644
index 0000000..8e96340
--- /dev/null
+++ b/satellit_installer/static_files/db_openslx_dump.sql
@@ -0,0 +1,282 @@
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
+
+SET time_zone = "+00:00";
+
+
+
+CREATE TABLE `cat_setting` (
+
+ `catid` int(10) unsigned NOT NULL AUTO_INCREMENT,
+
+ `name` varchar(250) NOT NULL,
+
+ `sortval` smallint(5) unsigned NOT NULL,
+
+ PRIMARY KEY (`catid`),
+
+ KEY `sortval` (`sortval`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+CREATE TABLE `clientlog` (
+
+ `logid` int(10) unsigned NOT NULL AUTO_INCREMENT,
+
+ `dateline` int(10) unsigned NOT NULL,
+
+ `logtypeid` varchar(30) NOT NULL,
+
+ `clientip` varchar(40) NOT NULL,
+
+ `description` varchar(255) NOT NULL,
+
+ `extra` text NOT NULL,
+
+ PRIMARY KEY (`logid`),
+
+ KEY `dateline` (`dateline`),
+
+ KEY `logtypeid` (`logtypeid`,`dateline`),
+
+ KEY `clientip` (`clientip`,`dateline`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+CREATE TABLE `configtgz` (
+
+ `configid` int(10) unsigned NOT NULL AUTO_INCREMENT,
+
+ `title` varchar(200) NOT NULL,
+
+ `filepath` varchar(255) NOT NULL,
+
+ PRIMARY KEY (`configid`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+CREATE TABLE `configtgz_module` (
+
+ `moduleid` int(10) unsigned NOT NULL AUTO_INCREMENT,
+
+ `title` varchar(200) NOT NULL,
+
+ `moduletype` varchar(16) NOT NULL,
+
+ `filepath` varchar(250) NOT NULL,
+
+ `contents` text NOT NULL,
+
+ PRIMARY KEY (`moduleid`),
+
+ KEY `title` (`title`),
+
+ KEY `moduletype` (`moduletype`,`title`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+CREATE TABLE `configtgz_x_module` (
+
+ `configid` int(10) unsigned NOT NULL,
+
+ `moduleid` int(10) unsigned NOT NULL,
+
+ PRIMARY KEY (`configid`,`moduleid`),
+
+ KEY `moduleid` (`moduleid`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+CREATE TABLE `permission` (
+
+ `mask` int(10) unsigned NOT NULL,
+
+ `identifier` varchar(32) NOT NULL,
+
+ `description` text NOT NULL,
+
+ PRIMARY KEY (`mask`),
+
+ UNIQUE KEY `identifier` (`identifier`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+CREATE TABLE `property` (
+
+ `name` varchar(50) NOT NULL,
+
+ `value` text NOT NULL,
+
+ PRIMARY KEY (`name`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+CREATE TABLE `setting` (
+
+ `setting` varchar(28) NOT NULL,
+
+ `catid` int(10) unsigned NOT NULL,
+
+ `defaultvalue` text NOT NULL,
+
+ `permissions` int(10) unsigned NOT NULL,
+
+ `validator` varchar(250) NOT NULL DEFAULT '',
+
+ `description` text NOT NULL,
+
+ PRIMARY KEY (`setting`),
+
+ KEY `catid` (`catid`,`setting`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+CREATE TABLE `setting_distro` (
+
+ `distroid` int(10) unsigned NOT NULL,
+
+ `setting` varchar(28) NOT NULL,
+
+ `value` text NOT NULL,
+
+ PRIMARY KEY (`distroid`,`setting`),
+
+ KEY `setting` (`setting`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+CREATE TABLE `setting_global` (
+
+ `setting` varchar(28) NOT NULL,
+
+ `value` text NOT NULL,
+
+ PRIMARY KEY (`setting`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+CREATE TABLE `user` (
+
+ `userid` int(10) unsigned NOT NULL AUTO_INCREMENT,
+
+ `login` varchar(100) NOT NULL,
+
+ `passwd` varchar(150) NOT NULL,
+
+ `fullname` varchar(100) DEFAULT NULL,
+
+ `phone` varchar(100) DEFAULT NULL,
+
+ `email` varchar(100) DEFAULT NULL,
+
+ `permissions` int(10) unsigned NOT NULL,
+
+ PRIMARY KEY (`userid`),
+
+ UNIQUE KEY `login` (`login`)
+
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+
+
+ALTER TABLE `configtgz_x_module`
+
+ ADD CONSTRAINT `configtgz_x_module_ibfk_1` FOREIGN KEY (`configid`) REFERENCES `configtgz` (`configid`) ON DELETE CASCADE,
+
+ ADD CONSTRAINT `configtgz_x_module_ibfk_2` FOREIGN KEY (`moduleid`) REFERENCES `configtgz_module` (`moduleid`);
+
+
+
+ALTER TABLE `setting`
+
+ ADD CONSTRAINT `setting_ibfk_1` FOREIGN KEY (`catid`) REFERENCES `cat_setting` (`catid`) ON UPDATE CASCADE;
+
+
+
+ALTER TABLE `setting_distro`
+
+ ADD CONSTRAINT `setting_distro_ibfk_1` FOREIGN KEY (`setting`) REFERENCES `setting` (`setting`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
+
+SET time_zone = "+00:00";
+
+
+
+INSERT IGNORE INTO `cat_setting` (`catid`, `name`, `sortval`) VALUES
+
+(0, 'Unkategorisiert', 20000),
+
+(1, 'Inaktivität und Abschaltung', 30),
+
+(2, 'Internetzugriff', 20),
+
+(3, 'Zeitsynchronisation', 100),
+
+(4, 'Grundsystem', 10);
+
+
+
+INSERT IGNORE INTO `permission` (`mask`, `identifier`, `description`) VALUES
+
+(1, 'superadmin', 'SuperAdmin - Dieser Benutzer darf alle Einstellungen sehen und ändern, unabhängig davon, ob ihr die Rechte dafür explizit gewährt wurden.'),
+
+(2, 'baseconfig_global', 'Basiskonfiguration global und für jeden Poolraum ändern.'),
+
+(4, 'baseconfig_local', 'Basiskonfiguration für dem Benutzer zugewiesene Poolräume ändern.');
+
+
+
+INSERT IGNORE INTO `setting` (`setting`, `catid`, `defaultvalue`, `permissions`, `validator`, `description`) VALUES
+
+('SLX_ADDONS', 0, 'vmware', 2, '', 'Zu ladende Addons. Zur Zeit steht nur vmware zur Verfügung.'),
+
+('SLX_BIOS_CLOCK', 3, 'off', 2, 'regex:/^(off|local|utc)$/', 'Legt fest, ob und wie die interne Uhr des Rechners im Bezug auf die Systemzeit des /MiniLinux/ gesetzt werden soll.\r\n*off* = Die interne Uhr des Rechners wird nicht verändert.\r\n*local* = Die interne Uhr wird auf die Lokalzeit gesetzt. Bevorzugt wenn z.B. noch eine native Windows-Installation auf dem PC vorhanden ist.\r\n*utc* = Die interne Uhr wird auf die /Koordinierte Weltzeit/ gesetzt. Dies ist die gängige Einstellung in einem reinen Linux-Umfeld.'),
+
+('SLX_LOGOUT_TIMEOUT', 1, '1800', 2, 'regex:/^\\d*$/', 'Zeit /in Sekunden/, die eine Benutzersitzung ohne Aktion sein darf, bevor sie beendet wird.\r\nFeld leer lassen, um die Funktion zu deaktivieren.'),
+
+('SLX_NET_DOMAIN', 2, '', 2, '', 'DNS-Domäne, in die sich die Clients eingliedern, sofern der DHCP Server keine solche vorgibt.'),
+
+('SLX_NTP_SERVER', 3, '0.de.pool.ntp.org 1.de.pool.ntp.org', 2, '', 'Adresse des NTP-Zeitservers. Es können mehrere Server mit Leerzeichen getrennt angegeben werden.\r\nDie Server werden der Reihe nach angefragt, bis ein antwortender Server gefunden wird.'),
+
+('SLX_PROXY_BLACKLIST', 2, '', 2, '', 'Adressen bzw. Adressbereiche, für die der Proxyserver nicht verwendet werden soll (z.B. der Adressbereich der Einrichtung). Gültige Angaben sind einzelne IP-Adressen, sowie IP-Bereiche in CIDR-Notation (z.B. 1.2.0.0/16). Mehrere Angaben können durch Leerzeichen getrennt werden.'),
+
+('SLX_PROXY_IP', 2, '', 2, '', 'Die Adresse des zu verwendenden Proxy Servers.'),
+
+('SLX_PROXY_MODE', 2, 'off', 2, 'regex:/^(off|on|auto|wpad)$/', 'Legt fest, ob zum Zugriff aufs Internet ein Proxy-Server benötigt wird.\r\n*off* = keinen Proxy benutzen.\r\n*on* = Proxy immer benutzen.\r\n*auto* = Proxy nur benutzen, wenn sich der Client-PC in einem privaten Adressbereich befindet.'),
+
+('SLX_PROXY_PORT', 2, '', 2, 'regex:/^\\d*$/', 'Der Port des zu verwendenden Proxy Servers.'),
+
+('SLX_PROXY_TYPE', 2, 'socks5', 2, '', 'Art des Proxys.\r\n*socks4*, *socks5*,\r\n*http-connect* (HTTP Proxy mit Unterstützung der CONNECT-Methode),\r\n*http-relay* (Klassischer HTTP Proxy)'),
+
+('SLX_REMOTE_LOG_SESSIONS', 0, 'anonymous', 2, 'regex:/^(yes|anonymous|no)$/', 'Legt fest, ob Logins und Logouts der Benutzer an den Satelliten gemeldet werden sollen.\r\n*yes* = Mit Benutzerkennung loggen\r\n*anonymous* = Anonym loggen\r\n*no* = Nicht loggen'),
+
+('SLX_ROOT_PASS', 4, '', 2, 'function:linuxPassword', 'Das root-Passwort des Grundsystems. Wird nur für Diagnosezwecke am Client benötigt.\r\nFeld leer lassen, um root-Logins zu verbieten.\r\n/Hinweis/: Das Passwort wird crypt $6$ gehasht, daher wir das Passwort nach dem Speichern nicht mehr lesbar sein!'),
+
+('SLX_SHUTDOWN_SCHEDULE', 1, '22:10 00:00', 2, 'regex:/^(\\s*\\d{1,2}:\\d{1,2})*$/', 'Feste Uhrzeit, zu der sich die Rechner ausschalten, auch wenn noch ein Benutzer aktiv ist.\r\nMehrere Zeitpunkte können durch Leerzeichen getrennt angegeben werden.'),
+
+('SLX_SHUTDOWN_TIMEOUT', 1, '1200', 2, 'regex:/^\\d*$/', 'Zeit in Sekunden, nach dem ein Rechner abgeschaltet wird, sofern kein Benutzer angemeldet ist.\r\nFeld leer lassen, um die Funktion zu deaktivieren.');
+
+
diff --git a/satellit_installer/static_files/dmsd.sh b/satellit_installer/static_files/dmsd.sh
new file mode 100755
index 0000000..19375c5
--- /dev/null
+++ b/satellit_installer/static_files/dmsd.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# This is a simple wrapper script for the Dozentenmodul server part
+
+/bin/su -s /bin/sh -c 'cd /opt/dmsd; java -jar ./bwLehrpoolSuite_Server.jar 2>&1 | logger -t dmsd' bwlehrpool
diff --git a/satellit_installer/static_files/finish_setup_public_key.pem b/satellit_installer/static_files/finish_setup_public_key.pem
new file mode 100644
index 0000000..bc67f08
--- /dev/null
+++ b/satellit_installer/static_files/finish_setup_public_key.pem
@@ -0,0 +1,14 @@
+-----BEGIN PUBLIC KEY-----
+MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtfNz/RzI8XfNPhOlvSGU
+retnk8ShsItLNVDqtWf1GOfOG88S0d+wQtH6+GAuZTstfnPukWEsa1WWxUus0/PQ
+9KXKNfy3qpxTmPjHyBQgSlu7Q1hCh20q9IMySf43SmlkKPYtqO66XjtpzJBg0lQD
+lTP0PERJrKlwNhBxkrsyt2YPXzQpKEQrS7QQSRZqJigr/MjWsCe//2uk9a74do6D
+60X26+WXL8XGIeU/Rt8RLqG9i7woD1FummtQTmWhO3tQbok19iSn3MEKhPSMCA5S
+1cAveXxDZBnnVsAbsxwz9NufyWDqcRKtCe3YOWMsNKsuQPu+0elG59deeN0YYo5G
+lGKHgG/R6jXO0NDb3rB6tQCkNAtdwU5NROwH8An6XYH8ORa6rkD+nJRpWA+eD+mr
+Pn28XT4Qs6/BTNROfhT9VIVKXlux03yEgRTubxzLfGOza6T7KBvq30vqZ+oQiC7k
+uHG2SwO3IoxNvWe2e8UiK6OUiOI3hfqiWsyLuf4jsy6k8FtMj6usJXCaM2Ugm3r3
+Lkd64I/yqbSiScJnacHAL2c7JY0yPwxHs8Wsv35WzoDSrXvdjGpro9Eaho7F/45j
+FDov3wP89WyUxRkDZyZ+CCbSoO2Kp0bUR1qyOcAeKWVHf8qV6wAfGOe0SXfhPW6v
+efQQsHnImME3N5Rv4NSFTsMCAwEAAQ==
+-----END PUBLIC KEY-----
diff --git a/satellit_installer/static_files/lighttpd.conf b/satellit_installer/static_files/lighttpd.conf
new file mode 100644
index 0000000..97c4142
--- /dev/null
+++ b/satellit_installer/static_files/lighttpd.conf
@@ -0,0 +1,31 @@
+server.modules = (
+ "mod_access",
+# "mod_alias",
+ "mod_compress",
+# "mod_redirect",
+ "mod_rewrite",
+)
+
+server.document-root = "/srv/openslx/www"
+server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
+server.errorlog = "/var/log/lighttpd/error.log"
+server.pid-file = "/var/run/lighttpd.pid"
+server.username = "www-data"
+server.groupname = "www-data"
+server.port = 80
+
+
+index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
+url.access-deny = ( "~", ".inc" )
+static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
+
+compress.cache-dir = "/var/cache/lighttpd/compress/"
+compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
+
+# default listening port for IPv6 falls back to the IPv4 port
+include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
+include_shell "/usr/share/lighttpd/create-mime.assign.pl"
+include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
+
+url.rewrite-once = ( "^/?boot/(.*)/config$" => "/slxadmin/api.php?do=getconfig&type=$1" )
+
diff --git a/satellit_installer/static_files/new_passwords.encrypted b/satellit_installer/static_files/new_passwords.encrypted
new file mode 100644
index 0000000..f694a40
--- /dev/null
+++ b/satellit_installer/static_files/new_passwords.encrypted
Binary files differ
diff --git a/satellit_installer/static_files/taskmanager-init-cron b/satellit_installer/static_files/taskmanager-init-cron
new file mode 100644
index 0000000..dc66d54
--- /dev/null
+++ b/satellit_installer/static_files/taskmanager-init-cron
@@ -0,0 +1,7 @@
+# Trigger taskmanager init on boot
+
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+@reboot root sleep 5 && wget -O - http://127.0.0.1/slxadmin/api.php?do=init > /dev/null 2>&1
+
diff --git a/satellit_installer/static_files/taskmanager.sh b/satellit_installer/static_files/taskmanager.sh
new file mode 100755
index 0000000..55b4aa6
--- /dev/null
+++ b/satellit_installer/static_files/taskmanager.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# This is a simple wrapper script for the Dozentenmodul server part
+
+/bin/su -s /bin/sh -c 'cd /opt/taskmanager; java -jar ./taskmanager.jar 2>&1 | logger -t taskmanager' taskmanager