#!/bin/sh
# Give a clue to why the home directory is missing.

# Should not run on Main-Server, Roaming-Workstation and Standalone
if [ -r /etc/debian-edu/config ] ; then
    . /etc/debian-edu/config
    if echo "$PROFILE" | egrep -q 'Workstation|LTSP-Server|Thin-Client-Server|Minimal' ; then
	if [ ! -d $HOME -o / = "$HOME" ] ; then
	    cat <<EOF | \
		xmessage -buttons Understood:0 -timeout 30 -center -file - 
Missing user home directory.

Check if the current computer DNS name is in the NIS netgroup
workstation-hosts and authorized to mount the home directories from
the NFS server.  This is done using Gosa, https://www/gosa/ .
EOF
	    exit 1
	fi
    fi
fi
