home
/
code
/
khatus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not rely on FS for msg parsing
[khatus.git]
/
src
/
awk
/
exe
/
actuate_device_add_to_automount.awk
diff --git
a/src/awk/exe/actuate_device_add_to_automount.awk
b/src/awk/exe/actuate_device_add_to_automount.awk
index
9510720
..
3683370
100644
(file)
--- a/
src/awk/exe/actuate_device_add_to_automount.awk
+++ b/
src/awk/exe/actuate_device_add_to_automount.awk
@@
-3,12
+3,17
@@
BEGIN {
Execute_On_Mount = Execute_On_Mount ? Execute_On_Mount : ""
}
Execute_On_Mount = Execute_On_Mount ? Execute_On_Mount : ""
}
-$1 == Node && \
-$2 == "khatus_sensor_devices" && \
-$3 == "data" && \
-$4 == "add" && \
-$5 ~ /[0-9]$/ {
- mount_device($5)
+{
+ delete msg
+ msg_parse(msg, $0)
+}
+
+msg["node"] == Node && \
+msg["module"] == "khatus_sensor_devices" && \
+msg["type"] == "data" && \
+msg["key"] == "add" && \
+msg["val"] ~ /[0-9]$/ {
+ mount_device(msg["val"])
}
function mount_device(path, cmd, line, lines, line_count, status, i,
}
function mount_device(path, cmd, line, lines, line_count, status, i,
This page took
0.027479 seconds
and
4
git commands to generate.