Hi.

On Sun, 25 May 2014 15:55:16 -0700
pe...@easthope.ca wrote:

> if [ -e MP/Mounted ]; then

A user could unmount the filesystem somehow, create an arbitrary file
there, and therefore fool your script.
Better check /proc/mounts for the needed filesystem (and its'
attributes) here.


>   if [ "$(command lsof -Fn MP)" ]; then 
>     # Files are open.  Abort logout to allow resolution.
>     exit 1

fuser -ck would kill any process using the filesystem in question.
You can also call 'umount -l' and rely on automatically unmounting the
filesystem once all offending processes will end.


> Not sure that "xdm restart" should run in the background.  

That depends on whenever you'll execute this script from an X client or
not. Stopping xdm would terminate X, which, in turn, will terminate all
X clients, which, in turn can prevent xdm from starting.

Reco


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20140526094253.13ca77023958203face74...@gmail.com

Reply via email to