summaryrefslogtreecommitdiffstats
path: root/server/modules
diff options
context:
space:
mode:
authorSimon Rettberg2013-11-16 12:10:12 +0100
committerSimon Rettberg2013-11-16 12:10:12 +0100
commit6e2b26c2b1bba2810c6cefff659e66d5613d563c (patch)
tree4ff796678336b188681c582649462195a6d88d16 /server/modules
parent[pam-offenburg] Cleanup, style, fix session close script (diff)
parent[vmchooser] quick fix for tcpsrvd not exiting properly. (diff)
downloadtm-scripts-6e2b26c2b1bba2810c6cefff659e66d5613d563c.tar.gz
tm-scripts-6e2b26c2b1bba2810c6cefff659e66d5613d563c.tar.xz
tm-scripts-6e2b26c2b1bba2810c6cefff659e66d5613d563c.zip
Merge branch 'master' of dnbd3:openslx-ng/tm-scripts
Diffstat (limited to 'server/modules')
-rwxr-xr-xserver/modules/pam-freiburg/opt/openslx/scripts/pam_script_ses_open15
1 files changed, 9 insertions, 6 deletions
diff --git a/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_ses_open b/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_ses_open
index abb353d8..c06f1bbb 100755
--- a/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_ses_open
+++ b/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_ses_open
@@ -27,12 +27,15 @@ if [ $(id -g $PAM_USER) -ge 1000 ]; then
# now we can mount the home directory!
mkdir -p /home/$PAM_USER
- if mount -t nfs4 -o rw,nosuid,nodev,nolock,intr,hard,sloppy,sec=krb5p "$FILESERVER":"$VOLUME" /home/"$PAM_USER"; then
- exit 0
- else
- echo "Failed to mount home directory for $PAM_USER"
- exit 1
+ chown "$PAM_USER" "/home/$PAM_USER"
+ mount -t nfs4 -o rw,nosuid,nodev,nolock,intr,hard,sloppy,sec=krb5p "$FILESERVER":"$VOLUME" /home/"$PAM_USER" &
+ MOUNT_PID=$!
+ for COUNTER in 1 2 4 4; do
+ kill -0 "$MOUNT_PID" || break
+ sleep "$COUNTER"
+ done
+ if kill -9 "$MOUNT_PID"; then
+ echo "Your home directory contents is unavailable. DO NOT SAVE ANYTHING HERE AS ALL WILL BE LOST UPON REBOOT!" > /home/"$PAM_USER"/WARNING.txt
fi
-
fi