diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.service | 10 | ||||
-rwxr-xr-x | meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.sh | 14 |
2 files changed, 24 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.service b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.service new file mode 100644 index 000000000..c1d0f602f --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.service @@ -0,0 +1,10 @@ +[Unit] +Description=Re-enable NICs mistakenly disabled by earlier BMC firmware +Wants=multi-user.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/enable-nics.sh + +[Install] +WantedBy=network.target diff --git a/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.sh b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.sh new file mode 100755 index 000000000..ce1473be1 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics/enable-nics.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +SEMAPHORE_FILE=/var/cache/private/nic_fixup_complete + +if [ -a $SEMAPHORE_FILE ]; then + exit 0 +fi + +for nicFile in /etc/systemd/network/*.network +do + sed -i -e"/Unmanaged/d" $nicFile +done + +touch $SEMAPHORE_FILE |