``` $ cat /etc/cron.daily/mlocate #! /bin/sh set -e # check if we run on battery and if so then don't run if which on_ac_power >/dev/null 2>&1; then ON_BATTERY=0 on_ac_power >/dev/null 2>&1 || ON_BATTERY=$? if [ "${ON_BATTERY}" -eq 1 ]; then exit 0 fi fi ... ``` My system did not have the on_ac_power script installed, so the above cron script was unable to detect whether the laptop is running on battery (`which` never succeeded, so no checks were performed). I think that the sys-apps/mlocate ebuild should either write a post-install message about an optional dependency to let the user decide whether he needs that kind of check, or there should be a corresponding USE flag.