I have done the following shell script that update the /etc/issue with the current ip's of all non-loopback interfaces:

echo "You can use one of the following ip addresses in order to look the page or even ssh into the machine" > /etc/issue
ip -4 -o addr show up  scope global | awk '{print $2,":",$4}'| sed -e "s/\/[1-9]*//" >> /etc/issue

Now I want to make it run at boot in order to update the /etc/issue with the network ips. Over Debian-based distros I would place it over /etc/rc.local but alpine does not have this file. How I will make this script to run in an equivalent way of /etc/rc.local?

Edit 1

I tried to put it on /etc/local.d but it failed to change properly the /etc/issue


You have to enable local.d scripts at boot time:

rc-update add local default

Then just place your script into /etc/local.d/UpdateIssue.start and make it executable.

You can find more details about local.d scripts in OpenRC on Gentoo wiki:


| improve this answer | |

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.