Pierre Yann Baco
2015-02-20 18:01:37 UTC
Hi All!
I'm writing a bash shell script to be executed on a LTSP 5.x client
(once copied in /opt/ltsp/amd6/usr/share/screen.d + ltsp-update-image.
The script (started as a SCREEN_O2=srv_launch in lts.conf) starts and
execute correctly (backup local mbr/gpt/partitions of windows/linux
station to the server).
As a simple "exit" in the script just restarts it, I need to include a
"shutdown -r now" or "shutdown -hP now" in the script.
Then, once the shutdown is called, I get a bunch of error messages on
the thin client screen before it reboots ou halts. Unfortunately, I
cant'get more details about those, even when syslog is redirected to the
server's one. I just know most of those error messages concern squashfs
error. I guess the shutdown close the nbd connection while the script is
finishing/dying.
Taking a look at the (chroot)/usr/share/ltsp/screen_session script, I've
found that my script (or any other SCREEN_xx= one) is started in a
"while true" loop by the ltsp "screen_session" script. Therefore, once a
user script exits (and/or starts a shutdown):
a) the screen_session father script tries to restart it
b) If it gets enough time to do it, this endless while/true loop
restarts effectively the script, causing strange effects, requiring some
kind of lock mechanism in the script to avoid a "re-run".
c) All this requires the presence of the squashfs-ed filesystem mounted
by nbd at startup.
d) At one time, the shutdown finally closes the nbd connection, causing
an error msg storm on the screen.
Q: Unless I modify the screen_session screen (break the while/true
loop), what can be done to get a "real/clean" shutdown ?
Bye,
--
Pierre Baco
Carlit.net
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_____________________________________________________________________
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
I'm writing a bash shell script to be executed on a LTSP 5.x client
(once copied in /opt/ltsp/amd6/usr/share/screen.d + ltsp-update-image.
The script (started as a SCREEN_O2=srv_launch in lts.conf) starts and
execute correctly (backup local mbr/gpt/partitions of windows/linux
station to the server).
As a simple "exit" in the script just restarts it, I need to include a
"shutdown -r now" or "shutdown -hP now" in the script.
Then, once the shutdown is called, I get a bunch of error messages on
the thin client screen before it reboots ou halts. Unfortunately, I
cant'get more details about those, even when syslog is redirected to the
server's one. I just know most of those error messages concern squashfs
error. I guess the shutdown close the nbd connection while the script is
finishing/dying.
Taking a look at the (chroot)/usr/share/ltsp/screen_session script, I've
found that my script (or any other SCREEN_xx= one) is started in a
"while true" loop by the ltsp "screen_session" script. Therefore, once a
user script exits (and/or starts a shutdown):
a) the screen_session father script tries to restart it
b) If it gets enough time to do it, this endless while/true loop
restarts effectively the script, causing strange effects, requiring some
kind of lock mechanism in the script to avoid a "re-run".
c) All this requires the presence of the squashfs-ed filesystem mounted
by nbd at startup.
d) At one time, the shutdown finally closes the nbd connection, causing
an error msg storm on the screen.
Q: Unless I modify the screen_session screen (break the while/true
loop), what can be done to get a "real/clean" shutdown ?
Bye,
--
Pierre Baco
Carlit.net
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_____________________________________________________________________
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