Skip to contentSkip to conversation

remove-net-rules: Add a class to remove net rules from images

PATCH New Chase Maupin 1 participant 1 message Oct 24, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 remove-net-rules: Add a class to remove net rules from images

* Inherit the remove-net-rules class in the TISDK images to remove the utility that creates the persistent net rules file.
* This allows moving SD cards between EVMs.

---
* Updated in version 2
* Added a semicolon to the end of the ROOTFS_POSTPROCESS_COMMAND list to properly terminate the command.

---
 meta-arago-distro/classes/remove-net-rules.bbclass |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 meta-arago-distro/classes/remove-net-rules.bbclass
meta-arago-distro/classes/remove-net-rules.bbclass new file +15 -0
new file mode 100644
index 0000000..fcad9c7
@@ -0,0 +1,15 @@
+# Add a ROOTFS_POSTPROCESS_COMMAND that will strip the write_net_rules
+# executable from the file system.  This will prevent the
+# 70-persistent-net.rules from being created.  Not having this file
+# will allow moving SD cards between EVMs and similar boards such as
+# beaglebone and the EVM.
+
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_remove_net_rules;"
+
+rootfs_remove_net_rules () {
+    if [ -e ${IMAGE_ROOTFS}/lib/udev/write_net_rules ]
+    then
+        rm ${IMAGE_ROOTFS}/lib/udev/write_net_rules
+    fi
+}
+
Signature · 1 line
1.7.0.4