Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pfSense-pkg-apcupsd - new option for set shutdown behavior #273

Merged
merged 3 commits into from
Feb 1, 2017

Conversation

dbaio
Copy link
Contributor

@dbaio dbaio commented Jan 29, 2017

This quote from apccontrol explains:

[...]
# You can customize every single command creating an executable file (may be a
# script or a compiled program) and calling it the same as the $1 parameter
# passed by apcupsd to this script.
#
# After executing your script, apccontrol continues with the default action.
# If you do not want apccontrol to continue, exit your script with exit 
# code 99. E.g. "exit 99".
[...]

Suggested and tested by LucaTo from pfsense forum. Thank you.

@dennypage
Copy link
Contributor

Calling /etc/rc.halt is probably not a good idea. If there are config changes happening, the shutdown could be denied which is not what you want. The pending loss of UPS power should be viewed as an overriding event, and higher priority than a pending config change.

@dbaio
Copy link
Contributor Author

dbaio commented Jan 30, 2017

Good point @dennypage.
By default apcupsd through apccontrol call this:

   doshutdown)
      printf "Beginning Shutdown Sequence" | wall
      ${SHUTDOWN} -h now "apcupsd initiated shutdown"
   ;;

Could I revert this last commit ?

@dennypage
Copy link
Contributor

dennypage commented Jan 31, 2017 via email

@rbgarga
Copy link
Member

rbgarga commented Jan 31, 2017

The chances of this to happen are really small, it waits 30 seconds trying to acquire the lock, if it cannot after 30 seconds it means something is really wrong.

I'd say the best option would be to add a new parameter to rc.halt, -f, that would mean to force shutdown even if lock was not acquired.

@dennypage
Copy link
Contributor

dennypage commented Jan 31, 2017 via email

@rbgarga
Copy link
Member

rbgarga commented Jan 31, 2017

Yeah, indeed, you are right. @dbaio can you please revert it?

@dbaio
Copy link
Contributor Author

dbaio commented Jan 31, 2017

Sure @rbgarga. Done.

@netgate-git-updates netgate-git-updates merged commit 9d3f659 into pfsense:devel Feb 1, 2017
@dbaio dbaio deleted the apcupsd_shutdown branch February 1, 2017 09:58
netgate-git-updates pushed a commit that referenced this pull request Apr 3, 2023
2.2.1 2023-01-20

    Detect tables used in the query of a PREPARE statement (#273)
    Expose recursive walk functionality via walk! (#268)
    Retain schema in name when parsing out functions (#272)

https://github.com/pganalyze/pg_query/blob/main/CHANGELOG.md
netgate-git-updates pushed a commit that referenced this pull request Jun 24, 2023
ChangeLog: https://www.nlnetlabs.nl/news/2023/Jun/07/nsd-4.7.0-released/

4.7.0
================
FEATURES:
- Merge #263: Add bash autocompletion script for nsd-control.
- Fix #267: Allow unencrypted local operation of nsd-control.
- Merge #269 from Fale: Add systemd service unit.
- Fix #271: DNSTAP over TCP, with dnstap-ip: "127.0.0.1@3333".
- dnstap over TLS, default enabled. Configured with the
  options dnstap-tls, dnstap-tls-server-name, dnstap-tls-cert-bundle,
  dnstap-tls-client-key-file and dnstap-tls-client-cert-file.

BUG FIXES:
- Fix #239: -Wincompatible-pointer-types warning in remote.c.
- Fix configure for -Wstrict-prototypes.
- Fix #262: Zone(s) not synchronizing properly via TLS.
- Fix for #262: More error logging for SSL read failures for zone
  transfers.
- Merge #265: Fix C99 compatibility issue.
- Fix #266: Fix build with --without-ssl.
- Fix for #267: neater variable definitions.
- Fix #270: reserved identifier violation.
- Fix to clean more memory on exit of dnstap collector.
- Fix dnstap to not check socket path when using IP address.
- Fix to compile without ssl with dnstap-tls code.
- Dnstap tls code fixes.
- Fix include brackets for ssl.h include statements, instead of quotes.
- Fix static analyzer warning about nsd_event_method initialization.
- Fix #273: Large TXT record breaks AXFR.
- Fix ixfr create from adding too many record types.
- Fix cirrus script for submit to coverity scan to libtoolize
  the configure script components config.guess and config.sub.
- Fix readme status badge links.
- make depend.
- Fix for build to run flex and bison before compiling code that needs
  the headers.
- Fix to remove unused whitespace from acx_nlnetlabs.m4 and config.h.
- For #279: Note that autoreconf -fi creates the configure script
  and also the needed auxiliary files, for autoconf 2.69 and 2.71.
- Fix unused variable warning in unit test, from clang compile.
- Fix #240: Prefix messages originating from verifier.
- Fix #275: Drop unnecessary root server checks.

PR:		272096
Reported by:	[email protected] (maintainer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants