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

« back to all changes in this revision

Viewing changes to scripts/ltspfs_entry

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Graber
  • Date: 2010-01-13 13:49:37 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20100113134937-xfuq6hiuel2iuded
Tags: 0.5.14-0ubuntu1
* new upstream version (0.5.14)
 * Fix mount point access when the users are in the same primary group.
 * Fix localapp mount when remote and local user doesn't have matching case.
 * Bump standards to 3.8.3
 * Update short description (was the same for both ltspfsd-core and ltspfsd)

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
            /usr/bin/ssh $SSH_OPTS -S ${LDM_SOCKET} ${SERVER} \
58
58
                "$DISPLAY_INFO /usr/sbin/ltspfsmounter ${MOUNTPOINT} $action"
 
59
            LDM_USERNAME=$(/usr/bin/ssh $SSH_OPTS -S ${LDM_SOCKET} ${SERVER} \
 
60
                 "$DISPLAY_INFO whoami")
 
61
            # Case may not match between the server and local, so let's do a quick hack
 
62
            LDM_USERNAME=$(grep -i ^${LDM_USERNAME}: /etc/passwd | cut -d: -f1)
 
63
             su ${LDM_USERNAME} -c "/usr/sbin/ltspfsmounter ${MOUNTPOINT} $action"
59
64
        fi
60
65
    done
61
66
 
81
86
        # if user's home directory is mounted via sshfs, assume we want a local
82
87
        # mount for localapps
83
88
        HOMEDIR=$(cat /proc/mounts|grep sshfs|awk '{print $2}'|head -1)
84
 
        export USER=${HOMEDIR##*/}
 
89
        USER=${HOMEDIR##*/}
 
90
        # need this since local user are lowercase
 
91
        export USER=$(grep -i ^${USER}: /etc/passwd | cut -d: -f1)
85
92
        if [ -n "${USER}" ]; then
86
93
            su ${USER} -c "/usr/sbin/ltspfsmounter ${MOUNTPOINT} $action"
87
94
        fi