[K12OSN] Can lts.conf go corrupt? Followup

Jim McQuillan jam at mcquil.com
Thu Oct 6 13:41:46 UTC 2005


Shane,

Ok, now that I have the lts.conf file, spotting the problem was simple.

With your file, I got an error at line 210.  So, I scanned backwards
through the file, and the problem is at line 202.

--------------------------------------------------------------------------
200 [00:04:5A:78:E4:AC]
201   X_MODE_0 = 640x480   25.175   640  656  752  800   480 490 492 525
202 -hsync -vsync
203 #[Alexander #3]
203 #[Alexander #4]
205 #[00:0C:41:26:D3:9C]
206 #X_MOUSE_PROTOCOL    = "Microsoft"
207 #X_MOUSE_DEVICE      = "/dev/ttyS0"
208 #X_MOUSE_BUTTONS     = 2
209 #[Babcock S]
210 [00:04:5A:78:E4:BD]
--------------------------------------------------------------------------

It's dying at line 210, because it hit something that it didn't expect.
If you look at line 202, you can see it's a problem.  202 is actually a
continuation of line 201.  The '-hsync -vsync' should have been on the
end of line 201.

Entries cannot span lines in lts.conf !!!

I moved my cursor up to line 201 (in vim), and pressed Shift-J, to join
line 202 to the end of 201, and guess what....

It no longer fails at line 210 !!!

But, it fails at line 340 for the very same reason.  If fix that
problem, and it fails at line 349, again, the same reason.
Once I fixed the problem at 349, it works fine.

So, here's my chance to rant just a bit.  I can't stress enough, how
important it is to keep these config files neat and tidy.
That lts.conf file you sent is nearly impossible for a human to read.
you seem to have a fear of blank lines.  Put some blanks in there,
spread it out a bit, that will make it much easier to spot problems.

Here's a snippet from your lts.conf file:

 198 #[Alexander #1]
 199 #[Alexander #2]
 200 [00:04:5A:78:E4:AC]
 201   X_MODE_0 = 640x480   25.175   640  656  752  800   480 490 492 525
 202 -hsync -vsync
 203 #[Alexander #3]
 204 #[Alexander #4]
 205 #[00:0C:41:26:D3:9C]
 206 #X_MOUSE_PROTOCOL    = "Microsoft"
 207 #X_MOUSE_DEVICE      = "/dev/ttyS0"
 208 #X_MOUSE_BUTTONS     = 2
 209 #[Babcock S]
 210 [00:04:5A:78:E4:BD]
 211 _MODE_0 = 800x600 at 60 38.21 800 832 976 1008 600 612 618 631
 212 X_MODE_0 = 800x600 at 60 38.21 800 832 976 1008 600 612 618 631
 213         XSERVER            = XF86_SVGA
 214 #[Berry J #1]
 215 [00:40:F4:B1:65:C0]
 216 X_MODE_0 = 800x600 at 60 38.21 800 832 976 1008 600 612 618 631
 217 #[Berry J #2]

I've already discussed the problem with lines 201-202.  But, look at
line 211.  What's that?  _MODE_0 isn't a variable used by ltsp.

here's what the same code looks like, cleaned up:

------------------------------------------------------------------------
    198 #[Alexander #1]
    199
    200 #[Alexander #2]
    201
    202 [00:04:5A:78:E4:AC]
    203    X_MODE_0 = 640x480 25.175 640 656 752 800 480 490 492 525
-hsync -vsync
    204
    205 #[Alexander #3]
    206
    207 #[Alexander #4]
    208
    209 #[00:0C:41:26:D3:9C]
    210 #   X_MOUSE_PROTOCOL    = "Microsoft"
    211 #   X_MOUSE_DEVICE      = "/dev/ttyS0"
    212 #   X_MOUSE_BUTTONS     = 2
    213
    214 #[Babcock S]
    215
    216 [00:04:5A:78:E4:BD]
    217    X_MODE_0 = 800x600 at 60 38.21 800 832 976 1008 600 612 618 631
    218    XSERVER  = XF86_SVGA
    219
    220 #[Berry J #1]
    221
    222 [00:40:F4:B1:65:C0]
    223    X_MODE_0 = 800x600 at 60 38.21 800 832 976 1008 600 612 618 631
    224
    225 #[Berry J #2]
-----------------------------------------------------------------------

The first thing I notice about the cleaned up example is that line 203
extends longer than 80 characters.  But, it's still all one line in the
file.

Each terminal is separated by blank lines, and you can tell the
difference between active entries, and commented entries.

So, my advice is clean up that file.  make it easier for a human to read
it, and errors will be easier to spot.

Jim McQuillan
jam at Ltsp.org









On Wed, 5 Oct 2005, Shane Stafford wrote:

> some success, I started a new file.
> cut and paste the help information at the top of the file.  Restarted a
> client and no errors. But, of course I  had none of my edits.
>
> So, I cut and pasted everything for clients from Library4 (a terminal)
> thru end of alphabet.
> Library 4 now works correctly, but a new error in line 233, again a Mac
> Address line.
> Looks the same to me as everyone other mac address line
> [00:40:F4:A5:9F:C3]
>
> I never really thought one parse error would mess up all your clients, but
> in the old lts.conf file it appeared to be doing just that.
>
> thanks
> Shane
>
> Shane Stafford, MCSE, MCT
> Director Information Services Glenburn School and Town
> Educational System Integrator/Network Engineer
> S & B Consulting
>
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
>




More information about the K12OSN mailing list