force eth0 for rpi
Signed-off-by: Aaron Murray <plugins@omv-extras.org>
This commit is contained in:
parent
f6fe63ec58
commit
e6c649fbf9
8
install
8
install
@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
logfile="omv_install.log"
|
logfile="omv_install.log"
|
||||||
scriptversion="2.3.4"
|
scriptversion="2.3.5"
|
||||||
|
|
||||||
|
|
||||||
_log()
|
_log()
|
||||||
@ -645,8 +645,10 @@ if [ ${skipNet} -ne 1 ]; then
|
|||||||
defLink="/etc/systemd/network/99-default.link"
|
defLink="/etc/systemd/network/99-default.link"
|
||||||
if [ -e "${defLink}" ]; then
|
if [ -e "${defLink}" ]; then
|
||||||
if [ ${rpi} -eq 1 ] && [ ${version} -eq 7 ]; then
|
if [ ${rpi} -eq 1 ] && [ ${version} -eq 7 ]; then
|
||||||
if [ -f "/usr/bin/raspi-config" ]; then
|
mac="$(ip -j a show dev eth0 | jq -r .[].address)"
|
||||||
raspi-config nonint do_net_names 1
|
_log "mac address - ${mac}"
|
||||||
|
if [ -n "${mac}" ]; then
|
||||||
|
echo -e "[Match]\nMACAddress=${mac}\n[Link]\nName=eth0" > /etc/systemd/network/10-persistent-net.link
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
rm -fv "${defLink}"
|
rm -fv "${defLink}"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user