initscripts: Fixed empty machine_id returned on some devices.
authorStanislav Brabec <utx@penguin.cz>
Tue, 10 Aug 2010 18:34:52 +0000 (18:34 +0000)
committerutx@penguin.cz <utx@penguin.cz>
Tue, 10 Aug 2010 18:34:52 +0000 (18:34 +0000)
Signed-off-by: Stanislav Brabec <utx@penguin.cz>
recipes/initscripts/files/functions
recipes/initscripts/initscripts_1.0.bb

index 51c1f13..b9dca1f 100644 (file)
@@ -6,7 +6,7 @@
 
 machine_id() {         # return the machine ID
     id=`awk 'BEGIN { FS=": " } /Hardware/ { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo`
-    if [ -n "$id" ]; then
+    if [ -z "$id" ]; then
         id=`awk 'BEGIN { FS=": " } /platform/ { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo`
     fi
     echo -n "$id"
index 38fe85e..8c38d7f 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "required"
 DEPENDS = "makedevs"
 RDEPENDS_${PN} = "makedevs"
 LICENSE = "GPL"
-PR = "r122"
+PR = "r123"
 
 SRC_URI = "file://functions \
            file://halt \
@@ -35,7 +35,7 @@ SRC_URI = "file://functions \
 
 SRC_URI_append_arm = " file://alignment.sh"
 
-CONFFILES_${PN} += "${sysconfdir}/device_table" 
+CONFFILES_${PN} += "${sysconfdir}/device_table"
 
 KERNEL_VERSION = ""