source:
xdg-lliurex-dirs/trunk/fuentes/install/etc/lightdm/ExitSession.d/umounter
Last change on this file was 1523, checked in by , 5 years ago | |
---|---|
|
|
File size: 258 bytes |
Line | |
---|---|
1 | #!/bin/bash |
2 | if [ -n "$1" ]; then |
3 | USER="$1" |
4 | fi |
5 | |
6 | if [ "$USER" = "" ]; then |
7 | exit 0 |
8 | fi |
9 | |
10 | x=$(who | awk "/$USER/"'{print $1}') |
11 | if [ -z "$x" ]; then |
12 | mount | awk -F ' on ' "/$USER/"'{print $2 }' | awk -F ' type ' '{ cmd = "umount " $1; system( cmd ) }' |
13 | fi |
Note: See TracBrowser
for help on using the repository browser.