make pre action script example more useful

Most notably the state changes has to have awareness in which state the
system was before requested state change.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>