Background: I have several RPis which I need to re-image. I use the stock Raspbian and they get their IPs via DHCP. This makes it difficult (in my specific environment) to know which IP they received, and then to configure them.
Today this configuration is automated via Ansible but the first connection is complicated (due to the lack of knowledge of the IP). I would like to move to SaltStack, where the connection is initiated by the client (the RPi in my case).
The question: the SaltStack software still needs to be installed and I would like to "drop" this installation script somewhere on the SD with the image. One thing I do not want to do is to modify the stock Raspbian (rebuild it), just have myinstallation.sh
(which would have the relevant commands and configuration) launched either as part of the first boot, or as part of any boot (I would remove it during the configuration).
Is such a functionality available? Or a similar approach?
raspi-config
does. – goldilocks Jan 27 '18 at 16:07raspi-config
is a tool one uses interactively after having logged in. This is not at all what I am trying to do (actually I do not want to log in in the first place) – WoJ Jan 27 '18 at 22:31/etc/hosts
). – WoJ Jan 27 '18 at 22:32raspi-config
service that automatically ranraspi-config
the first time the system was booted, then disabled itself. Looking in a recent image now all that service seems to do is detect shift held down to switch cpu governors; anyway, the point is that it is a fairly simple premise: You install a boot script that disables itself after completing everything it is suppose to do. – goldilocks Jan 28 '18 at 15:04