Changeset 2815


Ignore:
Timestamp:
Nov 10, 2016, 2:13:35 PM (3 years ago)
Author:
hectorgh
Message:

adding samba mount support instead of sshfs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lmd-client/trunk/fuentes/install/usr/share/ldm/rc.d.diversions/X01-localapps.lliurex

    r2549 r2815  
    167167        USER_GID="$gid"
    168168        mkdir -p ${LDM_HOME}
    169         rsync -ax /etc/skel/ "${LDM_HOME}/"
    170         chown -R  "$USER_UID":"$USER_GID" ${LDM_HOME}
     169       
     170        # LLIUREX HACK
     171        rsync -ax /etc/skel/ ${LDM_HOME}
     172        chown -R "$USER_UID":"$USER_GID" ${LDM_HOME}
     173
    171174        if [ -n "${XAUTHORITY_DIR}" ]; then
    172175            chown "$USER_UID":"$USER_GID" ${XAUTHORITY_DIR}
     
    195198    else
    196199        unset SSHFS_HOME
    197        
    198         # BEGIN LLX HACK
    199         #export SSHFS_HOME=true
    200         #sshfs -o ${follow_home_symlinks}allow_other,ControlPath=${LDM_SOCKET} ${LDM_SERVER}:${LDM_HOME} ${LDM_HOME}
    201        
     200
     201
    202202      # Create Vars
    203203        GRP_USER="$(id -ng ${LDM_USERNAME})"
    204204        NET_HOME="/net/server-sync/home/${GRP_USER}/${LDM_USERNAME}"
    205205
    206         # Create UserFiles Structure
    207         #mkdir ${LDM_HOME}/UserFiles
    208         #chown -R ${LDM_USERNAME}:${GRP_USER} ${LDM_HOME}/UserFiles
    209 
    210         # Mount SSHFS net/server-sync/home...
    211         #sshfs -o ${follow_home_symlinks}allow_other,ControlPath=${LDM_SOCKET} ${LDM_USERNAME}@${LDM_SERVER}:${NET_HOME}/UserFiles ${LDM_HOME}/UserFiles
    212         #echo "anem a muntar /net" > /tmp/homelinker2
    213        
    214        
    215         if [ ! -d "/net" ] ; then
    216                 mkdir /net
    217         fi
    218        
    219         sshfs -o nonempty,${follow_home_symlinks}allow_other,ControlPath=${LDM_SOCKET} ${LDM_USERNAME}@${LDM_SERVER}:/net /net
     206        ## OLD SSHFS MOUNT ## #######
     207
     208        #if [ ! -d "/net" ] ; then
     209        #       mkdir /net
     210        #fi
     211       
     212        #sshfs -o nonempty,${follow_home_symlinks}allow_other,ControlPath=${LDM_SOCKET} ${LDM_USERNAME}@${LDM_SERVER}:/net /net
    220213       
    221214               
    222         #for folder in Documents Groups Music Videos Pictures Share; do
    223         #    if [ -h "${LDM_HOME}/${folder}" ]; then
    224         #        echo "LLX LDM: ${LDM_HOME}/${folder} already exists" >> /var/log/ldm.log
    225         #        echo "LLX LDM: ${LDM_HOME}/${folder} already exists" >> /tmp/ldm.log
    226         #    else
    227         #        ln -s ${LDM_HOME}/UserFiles/${folder}/ ${LDM_HOME}/${folder}
    228         #        chown -R ${LDM_USERNAME}:${GRP_USER} ${LDM_HOME}/${folder}
    229         #    fi 
    230         #done
    231 
    232         # END LLX HACK
     215        ## ##################### ####
    233216
    234217    fi
     
    275258    n4d-modules enable-plugin /etc/n4d/conf.d/TeacherShare || true
    276259
     260    if boolean_is_true "$LTSP_FATCLIENT"; then
     261
     262            mkdir -p /run/$LDM_USERNAME/home
     263            mkdir -p /run/$LDM_USERNAME/share
     264            mkdir -p /run/$LDM_USERNAME/groups_share
     265            mkdir -p /run/$LDM_USERNAME/teachers_share
     266
     267            mount //server/home /run/$LDM_USERNAME/home -o username=$LDM_USERNAME,password=$LDM_PASSWORD
     268            mount //server/share /run/$LDM_USERNAME/share -o username=$LDM_USERNAME,password=$LDM_PASSWORD
     269            mount //server/groups_share /run/$LDM_USERNAME/groups_share -o username=$LDM_USERNAME,password=$LDM_PASSWORD
     270            mount //server/teachers_share /run/$LDM_USERNAME/teachers_share -o username=$LDM_USERNAME,password=$LDM_PASSWORD
     271
     272    fi
     273
     274    unset LDM_PASSWORD
     275
     276
    277277fi
Note: See TracChangeset for help on using the changeset viewer.