#!/bin/bash # # Copyright (c) Authors: https://www.armbian.com/authors # # This file is licensed under the terms of the GNU General Public # License version 2. This program is licensed "as is" without any # warranty of any kind, whether express or implied. # Functions: # # show_motd_warning export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin my_name="${0##*/}" Log=/var/log/armbian-hardware-monitor.log show_motd_warning() { cat > /etc/update-motd.d/90-warning </dev/null 2>&1 nmcli connection up "$UUID" >/dev/null 2>&1 elif [[ -f /etc/systemd/network/$DEVNAME.network ]]; then if ! grep '^ *MACAddress=' /etc/systemd/network/$DEVNAME.network > /dev/null; then sed -i "s/#MACAddress=/MACAddress=$MACADDR/g" /etc/systemd/network/$DEVNAME.network fi fi return 0 } # set fixed mac to the 1st active network adapter