Public bug reported:
Ubuntu 20.04:
If there is no mail/mailx command, then installing apcupsd will require to
install s-nail, probably as a replacement of the former 'heirloom-mailx'.
S-nail is a replacement for mail/mailx, with the same syntax. Installing s-nail
only provides s-nail command though, and not the mail/mailx commands (as
heirloom-mailx used to make) expected by apcupsd.
Steps:
1. Bug/proof: install apcupsd, unplug and replug APC. It does not send
any email to root from root.
2. Fix: Of course you can always hack the and add some email commands in
/etc/apcupsd/apccontrol but this is not correcting the bug at its root.
To correct issue properly, simply issue
* sudo ln -s /usr/bin/s-nail /etc/alternatives/mailx (optionnal)
* sudo ln -s /etc/alternatives/mailx /usr/bin/mailx (optionnal)
* sudo ln -s /usr/bin/s-nail /etc/alternatives/mail
* sudo ln -s /etc/alternatives/mail /usr/bin/mail
try again to unplug and plug back UPS. You now get email messages for
each events as it should w//o changing apccontrol file.
In clear, s-nail dependency is useless, unless we add the 2 simlinks.
Only mail, not mailx is really needed (i guess this is because of the
mail command in /etc/default/apcupsd) , but it's nice to have both
mail/mailx anyway if installing s-nail. I'm not sure if this is a pure
apcupsd issue, or s-nail issue. Those 2 links to mail and mailx are not
done by s-nail itself, probably for a reason, so I suggest this is more
a apcupsd install/config issue.
Regards -- mk
** Affects: apcupsd (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1877169
Title:
dependency (S-nail) improperly configured
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apcupsd/+bug/1877169/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs