From 8c4c115578ae05028b23868f0d3c90e0f82bede5 Mon Sep 17 00:00:00 2001 From: Miriam Ruiz Date: Fri, 4 May 2012 15:13:16 +0200 Subject: [PATCH] Fixed some stuff --- server/etc/init.d/aula_server_final_setup | 5 +++++ workstation/usr/share/educastur/srv-scripts/mount_vblade | 12 ++++++++++++ workstation/usr/share/educastur/ws-scripts/config_system | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 workstation/usr/share/educastur/srv-scripts/mount_vblade diff --git a/server/etc/init.d/aula_server_final_setup b/server/etc/init.d/aula_server_final_setup index 7de6e23..1ee19e3 100755 --- a/server/etc/init.d/aula_server_final_setup +++ b/server/etc/init.d/aula_server_final_setup @@ -19,6 +19,9 @@ DESC="Final setup of the system" NAME=educastur_final_setup SCRIPTNAME=/etc/init.d/$NAME +test -e /usr/share/educastur/config.sh || exit 1 +. /usr/share/educastur/config.sh + # Read configuration variable file if it is present [ -r /etc/default/educastur_parameters ] && . /etc/default/educastur_parameters [ -r /etc/default/educastur_parameters ] && cp /etc/default/educastur_parameters /workstation/etc/default/educastur_parameters @@ -41,6 +44,8 @@ do_start() # 1 if daemon was already running # 2 if daemon could not be started echo "Final adjustments to the system..." + + "${AULA_SRV_SCRIPTS_DIR}/mount_vblade" # Read-Only version of /workstation for exporting (installing) mount --bind /workstation /mnt/ws/ diff --git a/workstation/usr/share/educastur/srv-scripts/mount_vblade b/workstation/usr/share/educastur/srv-scripts/mount_vblade new file mode 100755 index 0000000..533a260 --- /dev/null +++ b/workstation/usr/share/educastur/srv-scripts/mount_vblade @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e +#set -x + +LABEL="AULA-WS" +test -n "${LABEL}" || exit 1 +PARTITION=$(/sbin/blkid | grep "LABEL=\"${LABEL}\"" | awk -F: '{print $1}') +test -n "${PARTITION}" || exit 1 +echo "Exporting through vblade: ${PARTITION}" + +vblade -r 1 1 eth0 "${PARTITION}" & diff --git a/workstation/usr/share/educastur/ws-scripts/config_system b/workstation/usr/share/educastur/ws-scripts/config_system index ebb422b..a0711e5 100755 --- a/workstation/usr/share/educastur/ws-scripts/config_system +++ b/workstation/usr/share/educastur/ws-scripts/config_system @@ -12,7 +12,7 @@ test -e /usr/share/educastur/config.sh || exit 1 cp -v ${AULA_BASE_DIR}/udev/* /etc/udev/rules.d/ echo "127.0.0.1 localhost" > /etc/hosts -echo "127.0.0.2 $(cat /etc/hostname) >> /etc/hosts +echo "127.0.0.2 $(cat /etc/hostname)" >> /etc/hosts MAC=`/sbin/ifconfig | grep eth | head -n 1 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | sed -e 's/://g'` python ${AULA_WS_SCRIPTS_DIR}/udp_broadcast_query.py > /tmp/server_parameters << EOF -- 2.11.4.GIT