#!/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
#

. ${0%/*}/helper_functions

if [ $EVENT_TYPE != ACADAPTER ]; then
    DEBUG "log_ac_change only makes sense for acadapter events ;-)" WARN
else
    TAG="AC status changed to"
    LOG="$EVENT_SUBTYPE"
    #
    # we do not use the DEBUG mechanism since we want to display this
    # regardless of the DEBUG settings. This is no problem
    logger -t "$TAG" "$LOG"
fi
$SCRIPT_RETURN $EV_ID 0 "log_ac_change finished"
EXIT 0
