On Wed, 7 Nov 2007, SZABO Zsolt wrote:
> On Tue, 6 Nov 2007, SZABO Zsolt wrote:
>
>> My guess is that the floppy is written in the ltspfs_fstab after booting
>> the client, however at that time there is neither an ldm_socket nor
>> user login, thus that part of /lib/udev/add_fstab_entry was not executed
>> (ssh -X -S ...) (Though, I wonder how that floppy0 folder is created
>> on the server when I login through ldm...)
>
> OK. I have found the scripts in $client_root/usr/share/ldm/rc.d
>
> After I piped its output to a log file (writing out the env.vars, too)
> I see:
> Cannot open X display
> Error: /tmp/.user-ltspfs/floppy0 is not mounted
>
> So I do not really understand: why does it not working through the
> ldm-script _while logging in_, and why does it when doing by hand or
> through /lib/udev/add_ltspfs* when plugging a pendrive _after a login_...?
Digging a bit further in the source code (thanks LTSP guys!) I found
that the rc scripts are invoked after ssh_session (sending an "LTSPROCKS"
message after successful login) but before the x_session... that's why
it cannot open X display. Therefore, I patched the S10-delayed-mounter
script (can be found in ldm_5.0.31debian2):
--- s10-delayed-mounter 2007-10-04 01:28:05.000000000 +0200
+++ S10-delayed-mounter 2007-11-07 14:42:19.000000000 +0100
@@ -4,8 +4,12 @@
# Script to automatically add what's in the ltspfs_fstab on login.
#
+#set >/tmp/.ldm.log
+( while ! ps ax |egrep -q ' +/usr/bin/ssh .*-S /var/run/ldm_socket.*cleanup';
do
+ sleep 1
+done >>/tmp/.ldm.log
if [ -f /var/run/ltspfs_fstab ]; then
while read DEV DIR TYPE OPTIONS DUMP PASS; do
ssh -S ${LDM_SOCKET} ${LDM_SERVER} "/usr/sbin/ltspfsmounter ${DIR}
add"
- done < /var/run/ltspfs_fstab
-fi
+ done < /var/run/ltspfs_fstab >>/tmp/.ldm.log 2>&1
+fi ) &
That means, it is backgrounded and the ltspfsmounter through ssh is
started only when the x_session is running... It is not too nice hack,
but it works. And maybe the latest LTSP5 needs no such workaround.
Bye,
--
Zsolt
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net