Package: apcupsd
Version: 3.14.8-2
Severity: normal
File: /sbin/smtp

apcupsd installs /sbin/smtp without documentation. It should have a
manual page or something. Currently the package installs a symlink to
the apcupsd manual page.

Looking at the usage output, this binary sure looks redundant to
mailx, so maybe it should not exist at all on Debian.

kenyon@grunt ~ % /sbin/smtp
0.000 apcupsd: smtp.c:230 Fatal error: no recipient given.

Usage: smtp [-f from] [-h mailhost] [-s subject] [-c copy] [recepient ...]
       -c          set the Cc: field
       -dnn        set debug level to nn
       -f          set the From: field
       -h          use mailhost:port as the SMTP server
       -s          set the Subject: field
       -?          print this message.

kenyon@grunt ~ % dpkg-query --listfiles apcupsd | grep smtp
/sbin/smtp
/usr/share/man/man1/smtp.1.gz

kenyon@grunt ~ % ls -l /usr/share/man/man1/smtp.1.gz
lrwxrwxrwx 1 root root 20 Mar  5  2010 /usr/share/man/man1/smtp.1.gz -> 
../man8/apcupsd.8.gz

kenyon@grunt ~ % dpkg-query --search /sbin/smtp
apcupsd: /sbin/smtp

kenyon@grunt ~ % file /sbin/smtp
/sbin/smtp: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically 
linked (uses shared libs), for GNU/Linux 2.6.18, stripped

-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (400, 'testing'), (300, 
'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apcupsd depends on:
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib
ii  libgcc1                       1:4.4.5-8  GCC support library
ii  libwrap0                      7.6.q-19   Wietse Venema's TCP wrappers libra

Versions of packages apcupsd recommends:
ii  apcupsd-doc                   3.14.8-2   APC UPS Power Management (document

Versions of packages apcupsd suggests:
ii  apcupsd-cgi                   3.14.8-2   APC UPS Power Management (web inte
ii  hal                           0.5.14-3   Hardware Abstraction Layer
ii  udev                          164-3      /dev/ and hotplug management daemo

-- Configuration Files:
/etc/apcupsd/apccontrol changed:
prefix=/usr
exec_prefix=${prefix}
APCPID=/var/run/apcupsd.pid
APCUPSD=/sbin/apcupsd
SHUTDOWN=/sbin/shutdown
SCRIPTSHELL=/bin/sh
SCRIPTDIR=/etc/apcupsd
WALL=true
if [ -f ${SCRIPTDIR}/${1} -a -x ${SCRIPTDIR}/${1} ]
then
    ${SCRIPTDIR}/${1} ${2} ${3} ${4}
    # exit code 99 means he does not want us to do default action
    if [ $? = 99 ] ; then
        exit 0
    fi
fi
case "$1" in
    killpower)
        echo "Apccontrol doing: ${APCUPSD} --killpower on UPS ${2}" | ${WALL}
        sleep 10
        ${APCUPSD} --killpower
        echo "Apccontrol has done: ${APCUPSD} --killpower on UPS ${2}" | ${WALL}
    ;;
    commfailure)
        echo "Warning communications lost with UPS ${2}" | ${WALL}
    ;;
    commok)
        echo "Communications restored with UPS ${2}" | ${WALL}
    ;;
    powerout)
    ;;
    onbattery)
        echo "Power failure on UPS ${2}. Running on batteries." | ${WALL}
    ;;
    offbattery)
        echo "Power has returned on UPS ${2}..." | ${WALL}
    ;;
    mainsback)
        if [ -f /etc/apcupsd/powerfail ] ; then
           printf "Continuing with shutdown."  | ${WALL}
        fi
    ;;
    failing)
        echo "Battery power exhaused on UPS ${2}. Doing shutdown." | ${WALL}
    ;;
    timeout)
        echo "Battery time limit exceeded on UPS ${2}. Doing shutdown." | 
${WALL}
    ;;
    loadlimit)
        echo "Remaining battery charge below limit on UPS ${2}. Doing 
shutdown." | ${WALL}
    ;;
    runlimit)
        echo "Remaining battery runtime below limit on UPS ${2}. Doing 
shutdown." | ${WALL}
    ;;
    doreboot)
        echo "UPS ${2} initiating Reboot Sequence" | ${WALL}
        ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot"
    ;;
    doshutdown)
        echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
        ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
    ;;
    annoyme)
        echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
    ;;
    emergency)
        echo "Emergency Shutdown. Possible battery failure on UPS ${2}." | 
${WALL}
    ;;
    changeme)
        echo "Emergency! Batteries have failed on UPS ${2}. Change them NOW" | 
${WALL}
    ;;
    remotedown)
        echo "Remote Shutdown. Beginning Shutdown Sequence." | ${WALL}
    ;;
    startselftest)
    ;;
    endselftest)
    ;;
    battdetach)
    ;;
    battattach)
    ;;
    *)  echo "Usage: ${0##*/} command"
        echo "       warning: this script is intended to be launched by"
        echo "       apcupsd and should never be launched by users."
        exit 1
    ;;
esac

/etc/apcupsd/apcupsd.conf changed:
UPSNAME watt
UPSCABLE usb
UPSTYPE usb
DEVICE
LOCKFILE /var/lock
SCRIPTDIR /etc/apcupsd
PWRFAILDIR /etc/apcupsd
NOLOGINDIR /etc
ONBATTERYDELAY 6
BATTERYLEVEL 5
MINUTES 3
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0

/etc/apcupsd/hosts.conf changed:
MONITOR localhost "Local Host"

/etc/default/apcupsd changed:
APCACCESS=/sbin/apcaccess
ISCONFIGURED=yes


-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to