The following is the recommended practice for event naming:
- Name your events in lower case:
startup
Separate multiple words with dashes (-), not underscores:
block-device-added
If you wish to namespace events, use a period (.):
lsb.some-thing-happed debian.some-other-thing
System-level namespacing will use a forward slash (/):
startup/failed ~scott/personal-event
- Use arguments for information that is normally used to filter the event. First argument should be the most related to the event:
network-device-added eth0 path-mounted /usr hda1
- Use environment variables for incidental information, to save the job having to look it up:
network-device-added eth0 IF_NAME=eth0 IF_ADDR=...
Environment variables are all capitals, words separated by underscores (_) and usually share a common prefix.
- Document your event in a manpage. Give the arguments and environment, and describe when the event is issued and what it means.
network-device-added(5)
-- CategoryDoc