Skip to contentSkip to conversation

initscripts: module id xilinx virtex

PATCH NAK Adrian Alonso 1 participant 1 message Jul 30, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 7/10 initscripts: module id xilinx virtex

* Add machine_id support for xilinx virtex platforms used in xserver-common for args settings
* Bump PR

---
 recipes/initscripts/files/functions    |    7 ++++++-
 recipes/initscripts/initscripts_1.0.bb |    2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
recipes/initscripts/files/functions +6 -1
index fb9a914..3e7d687 100644
@@ -5,7 +5,12 @@
 #
 
 machine_id() {		# return the machine ID
-    awk 'BEGIN { FS=": " } /Hardware/ { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
+    id=`awk 'BEGIN { FS=": " } /Hardware/ { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo`
+    if [ -n "$id" ]; then
+        echo -n "${id}"
+    else
+        awk 'BEGIN { FS=": " } /platform/ { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
+    fi
 }
 
 killproc() {		# kill the named process(es)
recipes/initscripts/initscripts_1.0.bb +1 -1
index 1b0a94c..38fe85e 100644
@@ -4,7 +4,7 @@ PRIORITY = "required"
 DEPENDS = "makedevs"
 RDEPENDS_${PN} = "makedevs"
 LICENSE = "GPL"
-PR = "r121"
+PR = "r122"
 
 SRC_URI = "file://functions \
            file://halt \
Signature · 1 line
1.7.2