diff options
author | Stanislav Brabec <utx@penguin.cz> | 2010-08-10 18:34:52 +0000 |
---|---|---|
committer | utx@penguin.cz <utx@penguin.cz> | 2010-08-10 18:34:52 +0000 |
commit | cdf13c967f6d86325ca577c0faa44dd593d7463e (patch) | |
tree | 0cbdb443d1a4f9e2c3464f1c69a59270d700ed21 /recipes/initscripts/files/functions | |
parent | b48cd835b4cf09ade37170eca3923317c37adc11 (diff) |
initscripts: Fixed empty machine_id returned on some devices.
Signed-off-by: Stanislav Brabec <utx@penguin.cz>
Diffstat (limited to 'recipes/initscripts/files/functions')
-rw-r--r-- | recipes/initscripts/files/functions | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes/initscripts/files/functions b/recipes/initscripts/files/functions index 51c1f13261..b9dca1f96b 100644 --- a/recipes/initscripts/files/functions +++ b/recipes/initscripts/files/functions @@ -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" |