What is the best way to execute a script after boot/reboot on a specific thin-client in an LTSP enviroment?

I want to run a script after boot to execute ltsp-localapps foo , but only on one client. Normally I would use /etc/rc.local - but in LTSP this would affect all clients using this image.

My best idea, so far, is to use the lts.conf parameter:

           string, default unset
           A crontab line to add for a thin client.

@reboot Run once, at startup.

but as man 5 crontab states

   Please  note  that startup, as far as @reboot is concerned, is the time
   when the cron(8) daemon startup.  In particular, it may be before  some
   system  daemons, or other facilities, were startup.

I just found the answer on irc.ltsp.org, see 14:25 to 14:35.

There is a lts.conf parameter called RCFILE_01...RCFILE_10 which allows to run scripts as a system services on startup:

       string, default unset
       Commands to be executed from /etc/rc.local when the client boots

Quote from the chat's original poster at position 14:35 hours:

...rcfile is in the chroot, and the path is relative ... for example file is in /opt/ltsp/(arch)/etc/rc.local/a_filename and in lts.conf it is RCFILE_01="/etc/rc.local/a_filename"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.