Ivan Berezovskiy | c46e7c0 | 2018-10-29 18:22:09 +0400 | [diff] [blame] | 1 | #!/bin/sh -e |
| 2 | # |
| 3 | # rc.local |
| 4 | # |
| 5 | # This script is executed at the end of each multiuser runlevel. |
| 6 | # Make sure that the script will "exit 0" on success or any other |
| 7 | # value on error. |
| 8 | # |
| 9 | # In order to enable or disable this script just change the execution |
| 10 | # bits. |
| 11 | # |
| 12 | # By default this script does nothing. |
| 13 | |
| 14 | if [ ! -f /tmp/bootstrap_interfaces ] && [ -d /srv/salt/reclass/nodes/_generated ]; then |
| 15 | sed -i "s/single_address:.*/single_address: $(hostname -I | cut -d ' ' -f 1)/g" /srv/salt/reclass/nodes/cfg01.* |
| 16 | touch /tmp/bootstrap_interfaces |
| 17 | fi |
| 18 | |
| 19 | exit 0 |