View Single Post
Old 09-28-2011, 02:40 AM   #3
mclien
42, the answer
mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.mclien for a long time would go to bed early.
 
Posts: 124
Karma: 17798
Join Date: Sep 2011
Location: Germany
Device: Pocketbook 603
If the "forbiden" Library is just hidden or end in an error message is not the big point, because either way the library isn't accessable. So thats OK for me.

I agree the more difficult part is to ensure only one Calibre is accessing the library at the time.
I think I'll do it not controlling the library access, but ensure just one Calibre instance is running inside the LAN. First step ist to start the calibre via shellscript, which is started when clicking the programm (from menue and from desktop icon).
The Libraries are stored on an exported nfs dir.
The (calibre-) shell does the following on startup:
-checking if an nfs to the library dir mount exists
-if it does, finding out, which client/user compination uses it
(-perhaps sends a screen message to this user, gmessage is your friend)
-if no nfs mount exists
-mounting the nfs-dir (with success control)
-starting calibre

Now I just need a way to cleanly unmount the nfs-dir, when shutting down calibre.
or maybe I have to use an aoutomount to mount the nfs share.

EDIT
Alternativly I thought about searching for processes wit ps and grep to ensure no clibre process is running somewhere in the LAN.
/EDIT

Last edited by mclien; 09-28-2011 at 03:15 AM.
mclien is offline   Reply With Quote