source: lmd-client/trunk/fuentes/install/usr/share/ldm/rc.d.diversions/X99-zlocalapps-cleanup.lliurex @ 512

Last change on this file since 512 was 512, checked in by mabarracus, 5 years ago

copy trusty code

File size: 1.5 KB
Line 
1if boolean_is_true "$LOCAL_APPS"; then
2    # Copy back passwd and group
3    for i in passwd group; do
4        [ -e "${LOCALAPPS_CACHE}/${i}" ] && cp "${LOCALAPPS_CACHE}/${i}" /etc/${i}
5    done
6
7    # Clean up cups config
8    [ -r "/etc/cups/client.conf" ] && rm -f /etc/cups/client.conf
9
10    # Clean up localapps menu
11    if boolean_is_true "$LOCAL_APPS_MENU" && [ -n "${TMP_XDG_MENU}" ]; then
12        if [ -S ${LDM_SOCKET} ]; then
13            ssh -S ${LDM_SOCKET} ${LDM_SERVER} rm -rf "${TMP_XDG_MENU}"
14        fi
15    fi
16
17    # Unmount sshfs and remove the mount dir
18    if [ -n "$SSHFS_HOME" ]; then
19        ## LLX Hack
20        ##fuserumount -uqz  ${LDM_HOME}/UserFiles # for old versions of llx..
21        #fusermount -uqz ${LDM_HOME}              # Original
22        fuserumount -uqz  /net                    # Current: Umount /net
23        ##rm -r ${LDM_HOME}
24        # rmdir ${LDM_HOME}
25        # End LLX Hack
26    fi
27
28    # Unmount other mounts
29    if [ -n "${LOCAL_APPS_EXTRAMOUNTS}" ]; then
30        oldifs="${IFS-not set}"
31        IFS=','
32        for extradir in ${LOCAL_APPS_EXTRAMOUNTS}; do
33            fusermount -uqz "${extradir}"
34            rmdir "${extradir}"
35        done
36        test "$oldifs" = "not set" && unset IFS || IFS="$oldifs"
37    fi
38
39    rm $LOCALAPPSD_PIDFILE
40fi
41
42# Clean up remote apps tmpdir
43if boolean_is_true "${REMOTE_APPS}" && [ -n "${REMOTE_APPS_TMPDIR}" ] ; then
44    fusermount -uqz "${REMOTE_APPS_TMPDIR}"
45    rmdir "${REMOTE_APPS_TMPDIR}"
46    if [ -w "/usr/lib/mime/packages/ltsp" ]; then
47        rm -f /usr/lib/mime/packages/ltsp
48        update-mime
49    fi
50fi
Note: See TracBrowser for help on using the repository browser.