[__cron] Fix cronjob removal if `is` and `should` don't match
__cron type has some bug: If you modify the cron expression (changing command or time arguments ..) and set the state to
absent, it will not remove the cron entry, even it would match because of the same object name.
It's because when the
$state_is is detected, there is either
absent. If the build cron expression different from the currently present expression, the state will be
absent. Directly behind, it will check if the states differ. But now, the shell checks
[ "$state_is" = "$state_should" ] which gets
[ "absent" = "absent" ] and aborts because it thinks the world is already perfect. In reality, the cronjob still exists, which could not be represented in these two states.
I fixed it by adding a new
$state_is state (named
modified) to represent that the cronjob is present but changed. It shouldn't being used as
$state_should because it is not possible to express this. Because it will never match with
$state_should, it will always execute the wanted state.