IRC chat logs for #ltsp on irc.freenode.net (webchat)


Channel log from 2 June 2019   (all times are UTC)

00:17vagrantc has joined IRC (vagrantc!~vagrant@unaffiliated/vagrantc)
02:54vagrantc has left IRC (vagrantc!~vagrant@unaffiliated/vagrantc, Quit: leaving)
06:34ricotz has joined IRC (ricotz!~ricotz@ubuntu/member/ricotz)
08:07woernie has joined IRC (woernie!~werner@p57A0E866.dip0.t-ipconnect.de)
10:41jeblesh has left IRC (jeblesh!d48f7755@gateway/web/freenode/ip.212.143.119.85, Ping timeout: 256 seconds)
11:45book` has left IRC (book`!~book`@68.ip-149-56-14.net, Quit: Leaving)
12:19ZAJDAN has left IRC (ZAJDAN!~zdenek@77.48.149.75, Quit: Konversation terminated!)
12:20ZAJDAN has joined IRC (ZAJDAN!~zdenek@77.48.149.75)
12:24ZAJDAN has joined IRC (ZAJDAN!~zdenek@77.48.149.75)
12:33woernie has left IRC (woernie!~werner@p57A0E866.dip0.t-ipconnect.de, Ping timeout: 248 seconds)
12:34woernie has joined IRC (woernie!~werner@pD9E8BC5A.dip0.t-ipconnect.de)
14:06woernie has left IRC (woernie!~werner@pD9E8BC5A.dip0.t-ipconnect.de, Ping timeout: 252 seconds)
14:07woernie has joined IRC (woernie!~werner@pD9E8BC5A.dip0.t-ipconnect.de)
14:17woernie has left IRC (woernie!~werner@pD9E8BC5A.dip0.t-ipconnect.de, Remote host closed the connection)
14:21woernie has joined IRC (woernie!~werner@pD9E8BC5A.dip0.t-ipconnect.de)
16:56GodFather has joined IRC (GodFather!~rcc@143.59.184.72)
18:10vagrantc has joined IRC (vagrantc!~vagrant@unaffiliated/vagrantc)
18:51ricotz has left IRC (ricotz!~ricotz@ubuntu/member/ricotz, Quit: Leaving)
18:53
<alkisg>
I'm thinking to promote all our conf files to "shell sourceable, that MAY have [sections]"
18:53
So for example /etc/ltsp/ltsp.conf may have just: BASE_DIR=/opt/ltsp
18:53
while /etc/ltsp/image.conf may have (with newlines inbetween): [buster-gnome] PARTITION=1 [bionic-mate] PARTITION=2 SQUASHFS_OPTIONS="no compression etc"
18:53
That would mean that the new lts.conf, now called /etc/ltsp/client.conf, should be case sensitive, and not allow spaces around =
18:54
Globs are supported in all sections, interpreted with shell's "case" command
18:54
<vagrantc>
by shell-sourceable, you mean individual lines, as the [] will evaluate in shell
18:55
?
18:55
<alkisg>
The [sections] get translated to shell functions by an awk script
18:55
[name] ==> section_name() {
18:55
<vagrantc>
ok, so the file itself isn't sourceable
18:56
<alkisg>
No; it needs to be: eval "$(ini2sh.awk < file.conf)"
18:57
example conf: https://termbin.com/7p4x ==> converted to shell: https://termbin.com/v35r
18:57
<vagrantc>
i could see end-users getting some really surprising and hard to debug syntax errors with a few small typos
18:57
<alkisg>
I run `sh -n file.conf` on all files
18:57
<vagrantc>
not that we're immune to that now
18:57
<alkisg>
So they'll get the appropriate error messages
18:58
Note the generated section_call() { in that second link
18:58
<vagrantc>
sh -n only catches so many things
18:58
<alkisg>
True; but they're supposed to be simple anyway; it catches more than getltscfg
18:58
So, all sections support globs, as they're translated to shell's case
18:59
A deliberate side effect is that advanced users can embed code in configuration files, if and when it makes sense
19:00
<vagrantc>
whoah, the functions self-destruct! :)
19:00
<alkisg>
No it's to avoid infinite recursion
19:00
Like .c #define __file__ / #undef __file__ lines
19:01
So if LIKE=section1 then LIKEs=section2, it won't loop forever
19:02
<vagrantc>
i kind of like the overall idea, but a little hesitant to give it a full tumbs-up ...
19:02
thumbs
19:04
<quinox>
it's better than inventing your own dynamic configuration language :)
19:05
<vagrantc>
alkisg: what's the "line directive ..." stuff?
19:07
<alkisg>
just testing that = works as expected, i.e. not a directive there but a command
19:09
ah sorry, that's a multiline variable
19:09
e.g. a complete fstab_x= with 2 lines
19:47chksome has joined IRC (chksome!~chksome@cpe-74-140-207-12.cinci.res.rr.com)
19:51chksome has left IRC (chksome!~chksome@cpe-74-140-207-12.cinci.res.rr.com, Client Quit)
20:18gdi2k has left IRC (gdi2k!~gdi2k@host86-158-82-187.range86-158.btcentralplus.com, Read error: Connection reset by peer)
22:08woernie has left IRC (woernie!~werner@pD9E8BC5A.dip0.t-ipconnect.de, Remote host closed the connection)