-check_automount()
-{
- # get pid for our automount process
- AUTOPID=`mount | \
- sed -ne "s%^automount(pid\([0-9]*\)) on $KEYDIR type autofs.*%\1%p"`
-
- # check if that process is still alive
- { [ -n "$AUTOPID" ] && ps -p $AUTOPID >/dev/null 2>&1; } || return 1
-
- # check if we can actually mount a user dir in the automount dir
- [ -d "$KEYDIR/root" ] || return 1
-}
-