The filter script, <adapter_name>-filter.asl, filters network events from being processed any further as notifications and also contains some instructions for processing notifications that will utilize the notification adapter. Add a variable, sentByCustom, which invokes the script running the customization actions you want from the custom script, <adapter_name>-custom.asl.
To modify the filter script:
-
Using sm_edit, open the filterscript.
-
Add the following line for the sentByCustom variable to the end of the script (as shown in bold type):
... START() { /* * Filter cleared events. */ OMIT_CLEAR_EVENTS() do { if (currentEvent->icType == "CLEAR" || currentEvent->icType == "NL_CLEAR" ) { currentEvent->filterMe = TRUE; currentEvent->sentByCustom = TRUE; } } }
-
Save the modified script. The sm_edit utility automatically saves the script to the appropriate local directory, located in BASEDIR/smarts/local/rules/notifier.