From 3c9bac53edac7651dea4a0a8f74200330c44ce41 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Tue, 1 Dec 2015 21:12:52 -0700 Subject: [PATCH] Seperate Cisco 7940/7960 from Cisco SPA so that both can work with check-sync for reboot and reprovision. --- app/registrations/cmd.php | 3 +++ resources/install/scripts/app/event_notify/index.lua | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/app/registrations/cmd.php b/app/registrations/cmd.php index 73f70f12b8..6a010d125d 100644 --- a/app/registrations/cmd.php +++ b/app/registrations/cmd.php @@ -54,6 +54,9 @@ else { if (preg_replace('/^.*?(cisco).*$/i', '$1', strtolower($agent)) == "cisco") { $vendor = "cisco"; } + if (preg_replace('/^.*?(cisco\/spa).*$/i', '$1', strtolower($agent)) == "cisco/spa") { + $vendor = "cisco-spa"; + } if (preg_replace('/^.*?(grandstream).*$/i', '$1', strtolower($agent)) == "grandstream") { $vendor = "grandstream"; } diff --git a/resources/install/scripts/app/event_notify/index.lua b/resources/install/scripts/app/event_notify/index.lua index e2634eae32..b32ecd5f93 100644 --- a/resources/install/scripts/app/event_notify/index.lua +++ b/resources/install/scripts/app/event_notify/index.lua @@ -67,6 +67,16 @@ --cisco if (vendor == "cisco") then + if (command == "reboot") then + event:addHeader('event-string', 'check-sync'); + end + if (command == "check_sync") then + event:addHeader('event-string', 'check-sync'); + end + end + +--cisco-spa + if (vendor == "cisco-spa") then if (command == "reboot") then event:addHeader('event-string', 'reboot=true'); end