X-Git-Url: https://git.xandkar.net/?p=khatus.git;a=blobdiff_plain;f=src%2Fawk%2Fexe%2Factuate_device_add_to_automount.awk;h=3683370b6e5109a9bccf26f86940ec9af25b44a7;hp=951072050576030d5b7760ceca73e0f9c7251a7c;hb=81336934f5dcb1895c050d71805ec37e56c400ad;hpb=0f81c6a873640359583d44a791e706de2d44ea1e 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 --- 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 : "" } -$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,