~ubuntu-branches/ubuntu/raring/ltspfs/raring-proposed

« back to all changes in this revision

Viewing changes to scripts/ldm/X10-delayed-mounter

  • Committer: Bazaar Package Importer
  • Author(s): Vagrant Cascadian
  • Date: 2009-07-17 12:10:56 UTC
  • mfrom: (4.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090717121056-bfeil0wm4jz3lmhh
Tags: 0.5.13-1
* new upstream version:
  - fixes to local mounts
    + find ldm's Xauthority in /var/run.
    + support ldm Xauthority in a sub-dir.
    + mount in /media/root if local mounting is configured.
    + only run mount for localapps if user's home dir is mounted via sshfs.
    + drop delayedmounter from xinitrc.d, as udev scripts should be
      sufficient now.
    + relocate delayed-mounter ldm hooks so they run after the user is added
      to /etc/passwd, and before the user is removed from /etc/passwd.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# sourced with .
 
3
#
 
4
# Script to automatically add what's in the ltspfs_fstab on login.
 
5
#
 
6
 
 
7
if [ -f /var/run/ltspfs_fstab ]; then
 
8
    while read DEV DIR TYPE OPTIONS DUMP PASS; do
 
9
        LTSPFS_MOUNTS="$LTSPFS_MOUNTS $DIR"
 
10
    done < /var/run/ltspfs_fstab
 
11
 
 
12
    for DIR in $LTSPFS_MOUNTS ; do
 
13
        SSH_OPTS="-X"
 
14
        unset DISPLAY_INFO
 
15
        case $LDM_DIRECTX in
 
16
            [Tt][Rr][Uu][Ee]|[Yy]|[Yy][Ee][Ss])
 
17
                unset SSH_OPTS
 
18
                DISPLAY_INFO="DISPLAY=${LDMINFO_IPADDR}${DISPLAY}"
 
19
            ;;
 
20
        esac
 
21
 
 
22
        ssh $SSH_OPTS -S ${LDM_SOCKET} ${LDM_SERVER} "$DISPLAY_INFO /usr/sbin/ltspfsmounter ${DIR} add"
 
23
 
 
24
        if [ -x /usr/sbin/ltspfsmounter ]; then
 
25
            unset SSH_CONNECTION
 
26
            su ${LDM_USERNAME} -c "/usr/sbin/ltspfsmounter ${DIR} add" 
 
27
        fi
 
28
    done
 
29
fi