#
# sourced with .
#
# Script to automatically add what's in the ltspfs_fstab on login.
#

if [ -f /var/run/ltspfs_fstab ]; then
    while read DEV DIR TYPE OPTIONS DUMP PASS; do
        LTSPFS_MOUNTS="$LTSPFS_MOUNTS $DIR"
    done < /var/run/ltspfs_fstab

    for DIR in $LTSPFS_MOUNTS ; do
        ssh -X -S ${LDM_SOCKET} ${LDM_SERVER} "/usr/sbin/ltspfsmounter ${DIR} add"
    done
fi
