initrdscripts: Do machine detection function refactor per RFC.
authorPaul Sokolovsky <pmiscml@gmail.com>
Wed, 26 Dec 2007 01:10:48 +0000 (01:10 +0000)
committerPaul Sokolovsky <pmiscml@gmail.com>
Wed, 26 Dec 2007 01:10:48 +0000 (01:10 +0000)
* Need to fix this, need to use good common codebase, because debugging
why some adhoc code doesn't work here or there is big waste of time.

packages/initscripts/initscripts-1.0/functions
packages/initscripts/initscripts_1.0.bb

index 358fc6e..fb9a914 100644 (file)
@@ -4,8 +4,8 @@
 #               shell scripts in the /etc/init.d directory.
 #
 
-cpuinfo_id() {         # return the Hardware module ID
-    awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
+machine_id() {         # return the machine ID
+    awk 'BEGIN { FS=": " } /Hardware/ { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
 }
 
 killproc() {           # kill the named process(es)
index 7fab418..4433d12 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "required"
 DEPENDS = "makedevs"
 RDEPENDS = "makedevs"
 LICENSE = "GPL"
-PR = "r103"
+PR = "r104"
 
 SRC_URI = "file://functions \
            file://halt \