Permalink
Please sign in to comment.
Showing
with
90 additions
and 7 deletions.
- +8 −1 README.md
- +12 −2 bootstrap.d/10-bootstrap.sh
- +14 −2 bootstrap.d/13-kernel.sh
- +6 −0 bootstrap.d/20-networking.sh
- +10 −0 bootstrap.d/50-firstboot.sh
- +14 −0 files/etc/rc.local
- +13 −0 files/firstboot/26-config-ifnames.sh
- +4 −0 files/firstboot/99-finish.sh
- +9 −2 rpi2-gen-image.sh
| @@ -0,0 +1,14 @@ | ||
| +#!/bin/sh -e | ||
| +# | ||
| +# rc.local | ||
| +# | ||
| +# This script is executed at the end of each multiuser runlevel. | ||
| +# Make sure that the script will "exit 0" on success or any other | ||
| +# value on error. | ||
| +# | ||
| +# In order to enable or disable this script just change the execution | ||
| +# bits. | ||
| +# | ||
| +# By default this script does nothing. | ||
| + | ||
| +exit 0 |
| @@ -0,0 +1,13 @@ | ||
| +logger -t "rc.firstboot" "Configuring network interface name" | ||
| + | ||
| +INTERFACE_NAME=$(dmesg | grep "renamed from eth0" | awk -F ":| " '{ print $9 }') | ||
| + | ||
| +if [ ! -z INTERFACE_NAME ] ; then | ||
| + if [ -r "/etc/systemd/network/eth.network" ] ; then | ||
| + sed -i "s/eth0/${INTERFACE_NAME}/" /etc/systemd/network/eth.network | ||
| + fi | ||
| + | ||
| + if [ -r "/lib/systemd/network/10-eth.network" ] ; then | ||
| + sed -i "s/eth0/${INTERFACE_NAME}/" /lib/systemd/network/10-eth.network | ||
| + fi | ||
| +fi |
| @@ -1,3 +1,7 @@ | ||
| +logger -t "rc.firstboot" "Reload systemd manager configuration" | ||
| +systemctl daemon-reload | ||
| +systemctl restart networking.service | ||
| +systemctl restart systemd-networkd.service | ||
| logger -t "rc.firstboot" "First boot actions finished" | ||
| rm -f /etc/rc.firstboot | ||
| sed -i '/.*rc.firstboot/d' /etc/rc.local |
0 comments on commit
09d30ea