1 | if 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 | # LLIUREX UMOUNT FOR FAT AND SEMITHIN CLIENTS |
---|
29 | if [ -e /etc/lightdm/ExitSession.d/umounter ]; then |
---|
30 | /etc/lightdm/ExitSession.d/umounter ${LDM_USERNAME} || true |
---|
31 | fi |
---|
32 | |
---|
33 | |
---|
34 | # Unmount other mounts |
---|
35 | if [ -n "${LOCAL_APPS_EXTRAMOUNTS}" ]; then |
---|
36 | oldifs="${IFS-not set}" |
---|
37 | IFS=',' |
---|
38 | for extradir in ${LOCAL_APPS_EXTRAMOUNTS}; do |
---|
39 | fusermount -uqz "${extradir}" |
---|
40 | rmdir "${extradir}" |
---|
41 | done |
---|
42 | test "$oldifs" = "not set" && unset IFS || IFS="$oldifs" |
---|
43 | fi |
---|
44 | |
---|
45 | rm $LOCALAPPSD_PIDFILE |
---|
46 | fi |
---|
47 | |
---|
48 | # Clean up remote apps tmpdir |
---|
49 | if boolean_is_true "${REMOTE_APPS}" && [ -n "${REMOTE_APPS_TMPDIR}" ] ; then |
---|
50 | fusermount -uqz "${REMOTE_APPS_TMPDIR}" |
---|
51 | rmdir "${REMOTE_APPS_TMPDIR}" |
---|
52 | if [ -w "/usr/lib/mime/packages/ltsp" ]; then |
---|
53 | rm -f /usr/lib/mime/packages/ltsp |
---|
54 | update-mime |
---|
55 | fi |
---|
56 | fi |
---|