5 CMDLINE="$(cat /proc/cmdline)"
6 DESTDIR="$(dirname "$0")"
9 test -e /usr/share/educastur/config.sh || exit 1
10 . /usr/share/educastur/config.sh
12 [ -r /etc/default/educastur_parameters ] && . /etc/default/educastur_parameters
14 if [ -z "${SERVER_IP}" ]; then
21 mount | grep -E "^[^ ]*:[^ ].* on $1 " 2>&1 >/dev/null || return 1
27 mount | grep -E "^$1 on $2 " 2>&1 >/dev/null || return 1
31 test -z "${SERVER_IP}" && exit 1
33 echo "Mounting aditional filesystems:"
39 PARAM="`echo $x | sed -e 's|^place=||g'`"
41 if [ "$PARAM" = "aula" ]; then
42 echo "- Network filesystems from ${SERVER_IP}"
44 if ! is_mounted /home; then
45 echo " · Mounting /home"
47 mount ${SERVER_IP}:/data/home /home -t nfs -o auto,defaults,tcp &
49 while ! is_mounted /home; do
50 echo " · Mounting /home"
51 mount ${SERVER_IP}:/data/home /home -t nfs -o auto,defaults,tcp &
55 if ! is_mounted /compartido; then
56 echo " · Mounting /compartido"
58 mount ${SERVER_IP}:/data/shared /compartido -t nfs -o auto,defaults,tcp &
60 while ! is_mounted /compartido; do
61 echo " · Mounting /compartido"
62 mount ${SERVER_IP}:/data/shared /compartido -t nfs -o auto,defaults,tcp &
66 if ! is_mounted /compartido/publico; then
67 echo " · Mounting /compartido/publico"
68 mkdir -p /compartido/publico
69 mount ${SERVER_IP}:/data/shared.open /compartido/publico -t nfs -o auto,defaults,tcp &
71 while ! is_mounted /compartido/publico; do
72 echo " · Mounting /compartido/publico"
73 mount ${SERVER_IP}:/data/shared.open /compartido/publico -t nfs -o auto,defaults,tcp &
76 if [ ! -e /compartido/publica ]; then
77 ln -s /compartido/publico /compartido/publica
80 echo " · Creating aufs overlay in /home/guest"
81 MAC=`ifconfig | grep eth | head -n 1 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | sed -e 's/://g'`
82 if [ -n "${MAC}" ]; then
83 if [ -e "/home/guest.aufs/${MAC}" ]; then
84 rm -rf "/home/guest.aufs/${MAC}"
86 mkdir -p "/home/guest.aufs/${MAC}"
87 mount -t aufs -o "xino=/tmp/.guest.xino,dirs=/home/guest.aufs/${MAC}=rw:/home/guest.base=ro" guest.union "/home/guest"
88 while ! aufs_mounted guest.union "/home/guest"; do
89 echo " · Mounting aufs overlay in /home/guest"
90 mount -t aufs -o "xino=/tmp/.guest.xino,dirs=/home/guest.aufs/${MAC}=rw:/home/guest.base=ro" guest.union "/home/guest"
93 chown guest:guest -R /home/guest
106 # PARAM="`echo $x | sed -e 's|^aufs=||g'`"
107 # if [ "$PARAM" = "nfs" ]; then
108 # if [ -d "/.nas" -a -d "/.ro/var" ]; then
109 # if [ -e "/.nas/var" ]; then
112 # mkdir -p "/.nas/var"
113 # mount -t aufs -o "xino=/tmp/.var.xino,dirs=/.nas/var=rw:/.ro/var=ro" var.union "/var"