-
I'l llike a command line to be executed for all the PC's with specific hostname. PC hostnames lab-01 to lab-99 execute a POST_INIT_xx command line. Can it be achieved using LTSP.CONF and a regular expression? |
Beta Was this translation helpful? Give feedback.
Replies: 24 comments 3 replies
-
Do you mean this? [lab-??]
POST_INIT_CMD="date >/run/date.txt" |
Beta Was this translation helpful? Give feedback.
-
I don't understand your question. Give an example. |
Beta Was this translation helpful? Give feedback.
-
Ltsp clients get their names from dhcp, as00, as01…bs00,bs01,bs02...
Rihgt? |
Beta Was this translation helpful? Give feedback.
-
This should do it: [*00]
POST_INIT_CMD="date >/run/date.txt" |
Beta Was this translation helpful? Give feedback.
-
I did try This works for all clients
This does not work for a EXTERNO3 client
|
Beta Was this translation helpful? Give feedback.
-
Try with the EXTERNO3 mac address instead, |
Beta Was this translation helpful? Give feedback.
-
It works with read -p and with read and MAC ADDRESS mode
But it's done 3 times!!! (screenshot) |
Beta Was this translation helpful? Give feedback.
-
PC hostnames are assigned using DHCP (option host-name "EXTERNO") Anyway Can it be performed HOSTNAME based? (not using mac address) Could it be somthing related to #568 ? |
Beta Was this translation helpful? Give feedback.
-
It's normal that it's done multiple times. There's PRE_INITRD_BOTTOM_x, POST_INITRD_BOTTOM_x, PRE_INIT_x, POST_INIT_x etc. That's why you're supposed to use Yeah if |
Beta Was this translation helpful? Give feedback.
-
On the client, what is the output of this command?
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Nice. Now try |
Beta Was this translation helpful? Give feedback.
-
OK, DNS appears to be fine. And what's the output of the following command? cat /proc/cmdline /run/net*.conf |
Beta Was this translation helpful? Give feedback.
-
Can you upload your whole ltsp.conf? |
Beta Was this translation helpful? Give feedback.
-
It looks good to me, except that /tmp/test will be deleted by systemd-tmpfiles so you won't see it at all. When I get some free time, I'll try to reproduce your setup and test. |
Beta Was this translation helpful? Give feedback.
-
I changed path but not changes. (thanks) |
Beta Was this translation helpful? Give feedback.
-
Can i help with trace for getting [hostname] working? |
Beta Was this translation helpful? Give feedback.
-
Make a test with a lowercase hostname, e.g. externo instead of EXTERNO3. |
Beta Was this translation helpful? Give feedback.
-
Tested with an absolutly empty
and with only
No luck, how can i get a shell trace? |
Beta Was this translation helpful? Give feedback.
-
Did you change the hostname to lowercase in your DNS server? Unfortunately documenting how to get a shell trace would require more time than I currently have... :) |
Beta Was this translation helpful? Give feedback.
-
I changed it in DHCP server (dhcp server sends hostnames). No DNS is used. |
Beta Was this translation helpful? Give feedback.
-
Got it working with lowercase in Solved. Tnakk you |
Beta Was this translation helpful? Give feedback.
Got it working with lowercase in
dhcpd.conf
LTSP.CONF
down not work with UPPERCASE hostnames.Solved.
Tnakk you