#!/bin/bash
#
# put a nice line into syslog for AC_offline and AC_online events.
# for Christian ;-)
#
# Part of the powersave package, Stefan Seyfried 2005
#
SCRIPT_RETURN=${0%/*}/powersaved_script_return # `dirname $0`/powe...

. /usr/lib/powersave/scripts/helper_functions

if [ $EVENT_TYPE != ACADAPTER ]; then
    DEBUG "log_ac_change only makes sense for acadapter events ;-)" WARN
    exit 0
fi

TAG="AC status changed to"
LOG="$EVENT_SUBTYPE"
#
# we do not use the DEBUG mechanism since we want to display this
# regardless of the POWERSAVE_DEBUG settings. This is no problem
logger -t "$TAG" "$LOG"

$SCRIPT_RETURN "$4|0|log_ac_change finished"
