Examples
banshee/examples-collection/examples/watches/
expect
Example: the watch expect, a value none of the expected ones; the boot target by SSH.
par banshee1 installation1 version
Publiée le 27 octobre 2026. First version in this collection.
Watch: expect
watch.expect raises when a value is none of the expected ones: here, the target a Linux boots into, expected multi-user.target on a server.
How to read it
array('warning' => array('multi-user.target')): the list of the values expected at this level; any other raises it.- Without options,
watch.expect('wrong-target', …, 'target')raises nothing until the administrator writes the expected values on the probe. - The output can be a text or a number.
To adapt it
- A desktop host boots into
graphical.target: the administrator adds it on its probe. - Expected values that differ from one host to the next (a version, a model): leave the list empty in the code, and let the probe say it.