FreeBSD Bugzilla – Attachment 208746 Details for
Bug 241623
New port: sysutils/apcctrl Fork of apcupsd 3.14.x for Brazilian APC nobreaks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
new port files
apcctrl.shar (text/plain), 24.95 KB, created by
Mario Lobo
on 2019-10-31 19:40:19 UTC
(
hide
)
Description:
new port files
Filename:
MIME Type:
Creator:
Mario Lobo
Created:
2019-10-31 19:40:19 UTC
Size:
24.95 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># apcctrl ># apcctrl/pkg-plist ># apcctrl/Makefile ># apcctrl/pkg-descr ># apcctrl/distinfo ># apcctrl/files ># apcctrl/files/patch-platforms_etc_Makefile ># apcctrl/files/patch-configure ># apcctrl/files/patch-include_tcpd.h ># apcctrl/files/patch-src_cgi_Makefile ># apcctrl/files/pkg-message.in ># apcctrl/files/apcctrl.in ># apcctrl/pkg-message ># >echo c - apcctrl >mkdir -p apcctrl > /dev/null 2>&1 >echo x - apcctrl/pkg-plist >sed 's/^X//' >apcctrl/pkg-plist << '95008fa09c547244c11a352ab1ef186c' >Xsbin/apcctrl >Xsbin/apcaccess >Xsbin/apctest >X@sample %%ETCDIR%%/apcctrl.conf.sample >X%%ETCDIR%%/apccontrol >X@sample %%ETCDIR%%/changeme.sample >X@sample %%ETCDIR%%/commfailure.sample >X@sample %%ETCDIR%%/commok.sample >X@sample %%ETCDIR%%/onbattery.sample >X@sample %%ETCDIR%%/offbattery.sample >X%%CGI%%@sample %%ETCDIR%%/apcctrl.css.sample >X%%CGI%%@sample %%ETCDIR%%/hosts.conf.sample >X%%CGI%%@sample %%ETCDIR%%/multimon.conf.sample >X%%CGI%%%%ETCDIR%%/cgi/multimon.cgi >X%%CGI%%%%ETCDIR%%/cgi/upsfstats.cgi >X%%CGI%%%%ETCDIR%%/cgi/upsimage.cgi >X%%CGI%%%%ETCDIR%%/cgi/upsstats.cgi >X%%GAPCMON%%bin/gapcmon >X%%GAPCMON%%share/applications/gapcmon.desktop >X%%GAPCMON%%share/pixmaps/apcctrl.png >X%%GAPCMON%%share/pixmaps/charging.png >X%%GAPCMON%%share/pixmaps/gapc_prefs.png >X%%GAPCMON%%share/pixmaps/onbatt.png >X%%GAPCMON%%share/pixmaps/online.png >X%%GAPCMON%%share/pixmaps/unplugged.png >Xman/man5/apcctrl.conf.5.gz >Xman/man8/apcaccess.8.gz >Xman/man8/apccontrol.8.gz >Xman/man8/apctest.8.gz >Xman/man8/apcctrl.8.gz >95008fa09c547244c11a352ab1ef186c >echo x - apcctrl/Makefile >sed 's/^X//' >apcctrl/Makefile << '631102af8e21cca407907f10d8291303' >X# Created by: Lars Köller <Lars.Koeller@Uni-Bielefeld.DE> >X# $FreeBSD: $ >X >XPORTNAME= apcctrl >XPORTVERSION= 0.8.21 >XCATEGORIES= sysutils >XMASTER_SITES= https://ufpr.dl.sourceforge.net/project/${PORTNAME}/ >X >XMAINTAINER= lobo@bsd.com.br >XCOMMENT= Fork of apcupsd 3.14.x with Brazilian APC nobreaks added >X >XLICENSE= GPLv2 >XLICENSE_FILE= ${WRKSRC}/COPYING >X >XUSES= gmake >XGNU_CONFIGURE= yes >XCONFIGURE_ARGS= --sbindir=${PREFIX}/sbin \ >X --with-nologin=/var/run \ >X --disable-install-distdir \ >X --sysconfdir=${ETCDIR} >X >XCONFIGURE_ENV+= LD="${CXX}" \ >X ac_cv_path_SHUTDOWN="/sbin/shutdown" >X >XUSE_RC_SUBR= apcctrl >XSUB_FILES= pkg-message >X >XOPTIONS_DEFINE= APCDUMB_DRV APCSMART_DRV BRAZIL_DRV CGI DOCS GAPCMON MODBUS \ >X MODBUS_USB PCNET_DRV SHUTDOWN_POWEROFF SNMP_DRV SNMP_DRV_OLD \ >X TCP_WRAPPERS TEST_DRV USB_DRV >XOPTIONS_DEFAULT= DOCS BRAZIL_DRV >XOPTIONS_SUB= yes >X >XAPCDUMB_DRV_DESC= Dumb UPS driver support >XAPCSMART_DRV_DESC= APC SmartUPS serial driver support >XBRAZIL_DRV_DESC= Brazilian APC-Microsol support >XCGI_DESC= Build CGI programs to show status >XGAPCMON_DESC= Build GTK GUI front-end >XMODBUS_DESC= MODBUS driver support >XMODBUS_USB_DESC= MODBUS USB driver support >XPCNET_DRV_DESC= PowerChute Network Shutdown driver support >XSHUTDOWN_POWEROFF_DESC= Shutdown behavior with Halt and Power off >XSNMP_DRV_DESC= SNMP driver support >XSNMP_DRV_OLD_DESC= Old SNMP driver support >XTCP_WRAPPERS_DESC= ${LIBWRAP_DESC} >XTEST_DRV_DESC= Test driver support >XUSB_DRV_DESC= USB driver support >X >XAPCDUMB_DRV_CONFIGURE_ENABLE= dumb >XAPCSMART_DRV_CONFIGURE_ENABLE= apcsmart >XBRAZIL_DRV_CONFIGURE_ENABLE= brazil >XBRAZIL_DRV_CONFIGURE_ON= --enable-brazil >XCGI_CONFIGURE_ENABLE= cgi >XCGI_CONFIGURE_ON= --with-cgi-bin=${ETCDIR}/cgi >XCGI_LIB_DEPENDS= libgd.so:graphics/gd >XGAPCMON_CONFIGURE_ENABLE= gapcmon >XGAPCMON_USES= pkgconfig >XGAPCMON_USE= GNOME=gconf2 >XGAPCMON_CONFLICTS= gapcmon-[0-9]* >XMODBUS_CONFIGURE_ENABLE= modbus >XMODBUS_USB_CONFIGURE_ENABLE= modbus-usb >XPCNET_DRV_CONFIGURE_ENABLE= pcnet >XSNMP_DRV_CONFIGURE_ENABLE= snmp >XSNMP_DRV_OLD_CONFIGURE_ENABLE= net-snmp >XSNMP_DRV_OLD_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp >XTCP_WRAPPERS_CONFIGURE_WITH= libwrap=yes >XTEST_DRV_CONFIGURE_ENABLE= test >XUSB_DRV_CONFIGURE_ENABLE= usb >X >X.include <bsd.port.options.mk> >X >Xpost-patch-SHUTDOWN_POWEROFF-on: >X ${REINPLACE_CMD} -e 's|-h now|-p now|' \ >X ${WRKSRC}/platforms/freebsd/apccontrol.in >X >X.include <bsd.port.mk> >631102af8e21cca407907f10d8291303 >echo x - apcctrl/pkg-descr >sed 's/^X//' >apcctrl/pkg-descr << 'f22d12f54d996880c5003ebc04f01e88' >X"apcctrl" can be used for controlling all Brazilian APC UPS models, >XUnofficial branch from apcupsd 3.14.x >X >XIt can monitor and log the current power and battery status, perform >Xautomatic shutdown, and can run in network mode in order to power down >Xother hosts on a LAN >X >XUPS models from APC Brasil focused: >X - BACK-UPS BR 1200VA (BZ1200BI-BR) >X - BACK-UPS BR 1500VA (BZ1500PBI-BR) >X - BACK-UPS BR 2200VA (BZ2200BI-BR e BZ2200I-BR) >X - SMART-UPS BR 1000VA (SUA1000BI-BR e SOLIS1000BI) >X - SMART-UPS BR 1500VA (SUA1500BI-BR e SOLIS1500BI) >X - SMART-UPS BR 2000VA (SUA2000BI-BR) >X - SMART-UPS BR 3000VA (SUA3000BI-BR) >X - STAY 800 (PS800) >X - STAY 700 (PS700) >X >XAuthor: Wagner Popov dos Santos >X wpopov@gmail.com >X >XWWW: http://www.apcctrl.com.br >f22d12f54d996880c5003ebc04f01e88 >echo x - apcctrl/distinfo >sed 's/^X//' >apcctrl/distinfo << 'd91e66634819d4077b55b6deaa111066' >XTIMESTAMP = 1571857687 >XSHA256 (apcctrl-0.8.21.tar.gz) = ad3bc43de922f25e98db6e97390034600d094b257458b25ee8677b1c63b0f1bf >XSIZE (apcctrl-0.8.21.tar.gz) = 3531048 >d91e66634819d4077b55b6deaa111066 >echo c - apcctrl/files >mkdir -p apcctrl/files > /dev/null 2>&1 >echo x - apcctrl/files/patch-platforms_etc_Makefile >sed 's/^X//' >apcctrl/files/patch-platforms_etc_Makefile << '328069fbc564bfe7e67b7f69bae6ec79' >X--- platforms/etc/Makefile.orig 2014-04-09 22:15:34 UTC >X+++ platforms/etc/Makefile >X@@ -8,12 +8,12 @@ all-uninstall: uninstall-etc >X >X install-etc: >X $(call MKDIR,$(sysconfdir)) >X- $(call INSTNEW,644,apcctrl.conf,$(sysconfdir)) >X- $(call INSTORIG,744,changeme,$(sysconfdir)) >X- $(call INSTORIG,744,commfailure,$(sysconfdir)) >X- $(call INSTORIG,744,commok,$(sysconfdir)) >X- $(call INSTORIG,744,offbattery,$(sysconfdir)) >X- $(call INSTORIG,744,onbattery,$(sysconfdir)) >X+ $(call INSTDATA,644,apcctrl.conf,$(sysconfdir)/apcctrl.conf.sample) >X+ $(call INSTDATA,744,changeme,$(sysconfdir)/changeme.sample) >X+ $(call INSTDATA,744,commfailure,$(sysconfdir)/commfailure.sample) >X+ $(call INSTDATA,744,commok,$(sysconfdir)/commok.sample) >X+ $(call INSTDATA,744,offbattery,$(sysconfdir)/offbattery.sample) >X+ $(call INSTDATA,744,onbattery,$(sysconfdir)/onbattery.sample) >X >X uninstall-etc: >X >328069fbc564bfe7e67b7f69bae6ec79 >echo x - apcctrl/files/patch-configure >sed 's/^X//' >apcctrl/files/patch-configure << 'f8415abae81877a7283ee2477fc27a09' >X--- configure.orig 2016-04-18 20:26:31 UTC >X+++ configure >X@@ -7470,7 +7470,7 @@ >X $as_echo_n "checking for libwrap... " >&6; } >X cat confdefs.h - <<_ACEOF >conftest.$ac_ext >X /* end confdefs.h. */ >X- #include <tcpd.h> >X+ #include "tcpd.h" >X int deny_severity = 0; >X int allow_severity = 0; >X struct request_info *req; >X@@ -7493,7 +7493,7 @@ >X LIBS="$saved_LIBS -lwrap -lnsl" >X cat confdefs.h - <<_ACEOF >conftest.$ac_ext >X /* end confdefs.h. */ >X- #include <tcpd.h> >X+ ##include "tcpd.h" >X int deny_severity = 0; >X int allow_severity = 0; >X struct request_info *req; >X@@ -8548,55 +8548,6 @@ >X ;; >X esac >X >X-if test -n "$GCC"; then >X- # Starting with GCC 3.0, you must link C++ programs against either >X- # libstdc++ (shared by default), or libsupc++ (always static). If >X- # you care about binary portability between Linux distributions, >X- # you need to either 1) build your own GCC with static C++ libraries >X- # or 2) link using gcc and libsupc++. We choose the latter since >X- # CUPS doesn't (currently) use any of the stdc++ library. >X- # >X- # Previous versions of GCC do not have the reliance on the stdc++ >X- # or g++ libraries, so the extra supc++ library is not needed. >X- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libsupc++ is required" >&5 >X-$as_echo_n "checking if libsupc++ is required... " >&6; } >X- >X- SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`" >X- case "$SUPC" in >X- libsupc++.a*) >X- # Library not found, so this is an older GCC... >X- LD="$CXX" >X- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >X-$as_echo "no" >&6; } >X- ;; >X- *) >X- # This is gcc 3.x, and it knows of libsupc++, so we need it >X- LIBS="$LIBS -lsupc++" >X- LD="$CC" >X- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 >X-$as_echo "yes" >&6; } >X- >X- # See if this system has a broken libsupc++ that requires >X- # a workaround (FreeBSD 5.x, 6.x) >X- case $host in >X- *-*-freebsd*) >X- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libsupc++ is missing __terminate_handler" >&5 >X-$as_echo_n "checking if libsupc++ is missing __terminate_handler... " >&6; } >X- nm -C --defined-only "$SUPC" 2>/dev/null | grep __terminate_handler > /dev/null >X- if test $? -eq 0 ; then >X- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >X-$as_echo "no" >&6; } >X- else >X- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes -- will attempt workaround" >&5 >X-$as_echo "yes -- will attempt workaround" >&6; } >X- LIBEXTRAOBJ="$LIBEXTRAOBJ libsupc++fix.cpp" >X- fi >X- ;; >X- esac >X- ;; >X- esac >X-fi >X- >X { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-exceptions" >&5 >X $as_echo_n "checking whether C compiler accepts -fno-exceptions... " >&6; } >X if ${ax_cv_check_cflags___fno_exceptions+:} false; then : >f8415abae81877a7283ee2477fc27a09 >echo x - apcctrl/files/patch-include_tcpd.h >sed 's/^X//' >apcctrl/files/patch-include_tcpd.h << 'b600496d6da74d757db8b526552a3c2f' >X--- include/tcpd.h.orig 2016-06-15 10:03:22 UTC >X+++ include/tcpd.h >X@@ -0,0 +1,235 @@ >X+ /* >X+ * @(#) tcpd.h 1.5 96/03/19 16:22:24 >X+ * >X+ * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. >X+ */ >X+ >X+/* >X+ * This version of the file has been hacked over by >X+ * Kern Sibbald to make it compatible with C++ for >X+ * the few functions that Bacula uses. 19 April 2002 >X+ * It now compiles with C++ but remains untested. >X+ * A correct fix would require significantly more work. >X+ */ >X+ >X+#ifdef __cplusplus >X+extern "C" { >X+#endif >X+ >X+/* Structure to describe one communications endpoint. */ >X+ >X+#define STRING_LENGTH 128 /* hosts, users, processes */ >X+ >X+struct host_info { >X+ char name[STRING_LENGTH]; /* access via eval_hostname(host) */ >X+ char addr[STRING_LENGTH]; /* access via eval_hostaddr(host) */ >X+ struct sockaddr_in *sin; /* socket address or 0 */ >X+ struct t_unitdata *unit; /* TLI transport address or 0 */ >X+ struct request_info *request; /* for shared information */ >X+}; >X+ >X+/* Structure to describe what we know about a service request. */ >X+ >X+struct request_info { >X+ int fd; /* socket handle */ >X+ char user[STRING_LENGTH]; /* access via eval_user(request) */ >X+ char daemon[STRING_LENGTH]; /* access via eval_daemon(request) */ >X+ char pid[10]; /* access via eval_pid(request) */ >X+ struct host_info client[1]; /* client endpoint info */ >X+ struct host_info server[1]; /* server endpoint info */ >X+ void (*sink) (void); /* datagram sink function or 0 */ >X+ void (*hostname) (void); /* address to printable hostname */ >X+ void (*hostaddr) (void); /* address to printable address */ >X+ void (*cleanup) (void); /* cleanup function or 0 */ >X+ struct netconfig *config; /* netdir handle */ >X+}; >X+ >X+/* Common string operations. Less clutter should be more readable. */ >X+ >X+#define STRN_CPY(d,s,l) { strncpy((d),(s),(l)); (d)[(l)-1] = 0; } >X+ >X+#define STRN_EQ(x,y,l) (strncasecmp((x),(y),(l)) == 0) >X+#define STRN_NE(x,y,l) (strncasecmp((x),(y),(l)) != 0) >X+#define STR_EQ(x,y) (strcasecmp((x),(y)) == 0) >X+#define STR_NE(x,y) (strcasecmp((x),(y)) != 0) >X+ >X+ /* >X+ * Initially, all above strings have the empty value. Information that >X+ * cannot be determined at runtime is set to "unknown", so that we can >X+ * distinguish between `unavailable' and `not yet looked up'. A hostname >X+ * that we do not believe in is set to "paranoid". >X+ */ >X+ >X+#define STRING_UNKNOWN "unknown" /* lookup failed */ >X+#define STRING_PARANOID "paranoid" /* hostname conflict */ >X+ >X+extern char unknown[]; >X+extern char paranoid[]; >X+ >X+#define HOSTNAME_KNOWN(s) (STR_NE((s),unknown) && STR_NE((s),paranoid)) >X+ >X+#define NOT_INADDR(s) (s[strspn(s,"01234567890./")] != 0) >X+ >X+/* Global functions. */ >X+ >X+#if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) >X+extern void fromhost(); /* get/validate client host info */ >X+#else >X+#define fromhost sock_host /* no TLI support needed */ >X+#endif >X+ >X+extern int hosts_access(struct request_info *); /* access control */ >X+extern void shell_cmd(void); /* execute shell command */ >X+extern char *percent_x(void); /* do %<char> expansion */ >X+extern void rfc931(void); /* client name from RFC 931 daemon */ >X+extern void clean_exit(void); /* clean up and exit */ >X+extern void refuse(void); /* clean up and exit */ >X+extern char *xgets(void); /* fgets() on steroids */ >X+extern char *split_at(void); /* strchr() and split */ >X+extern unsigned long dot_quad_addr(void); /* restricted inet_addr() */ >X+ >X+/* Global variables. */ >X+ >X+extern int allow_severity; /* for connection logging */ >X+extern int deny_severity; /* for connection logging */ >X+extern char *hosts_allow_table; /* for verification mode redirection */ >X+extern char *hosts_deny_table; /* for verification mode redirection */ >X+extern int hosts_access_verbose; /* for verbose matching mode */ >X+extern int rfc931_timeout; /* user lookup timeout */ >X+extern int resident; /* > 0 if resident process */ >X+ >X+ /* >X+ * Routines for controlled initialization and update of request structure >X+ * attributes. Each attribute has its own key. >X+ */ >X+ >X+#ifdef __STDC__ >X+extern struct request_info *request_init(struct request_info *,...); >X+extern struct request_info *request_set(struct request_info *,...); >X+#else >X+extern struct request_info *request_init(); /* initialize request */ >X+extern struct request_info *request_set(); /* update request structure */ >X+#endif >X+ >X+#define RQ_FILE 1 /* file descriptor */ >X+#define RQ_DAEMON 2 /* server process (argv[0]) */ >X+#define RQ_USER 3 /* client user name */ >X+#define RQ_CLIENT_NAME 4 /* client host name */ >X+#define RQ_CLIENT_ADDR 5 /* client host address */ >X+#define RQ_CLIENT_SIN 6 /* client endpoint (internal) */ >X+#define RQ_SERVER_NAME 7 /* server host name */ >X+#define RQ_SERVER_ADDR 8 /* server host address */ >X+#define RQ_SERVER_SIN 9 /* server endpoint (internal) */ >X+ >X+ /* >X+ * Routines for delayed evaluation of request attributes. Each attribute >X+ * type has its own access method. The trivial ones are implemented by >X+ * macros. The other ones are wrappers around the transport-specific host >X+ * name, address, and client user lookup methods. The request_info and >X+ * host_info structures serve as caches for the lookup results. >X+ */ >X+ >X+extern char *eval_user(void); /* client user */ >X+extern char *eval_hostname(void); /* printable hostname */ >X+extern char *eval_hostaddr(void); /* printable host address */ >X+extern char *eval_hostinfo(void); /* host name or address */ >X+extern char *eval_client(struct request_info *); /* whatever is available */ >X+extern char *eval_server(void); /* whatever is available */ >X+#define eval_daemon(r) ((r)->daemon) /* daemon process name */ >X+#define eval_pid(r) ((r)->pid) /* process id */ >X+ >X+/* Socket-specific methods, including DNS hostname lookups. */ >X+ >X+extern void sock_host(struct request_info *); >X+extern void sock_hostname(void); /* translate address to hostname */ >X+extern void sock_hostaddr(void); /* address to printable address */ >X+#define sock_methods(r) \ >X+ { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } >X+ >X+/* The System V Transport-Level Interface (TLI) interface. */ >X+ >X+#if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) >X+extern void tli_host(); /* look up endpoint addresses etc. */ >X+#endif >X+ >X+ /* >X+ * Problem reporting interface. Additional file/line context is reported >X+ * when available. The jump buffer (tcpd_buf) is not declared here, or >X+ * everyone would have to include <setjmp.h>. >X+ */ >X+ >X+#ifdef __STDC__ >X+extern void tcpd_warn(char *, ...); /* report problem and proceed */ >X+extern void tcpd_jump(char *, ...); /* report problem and jump */ >X+#else >X+extern void tcpd_warn(); >X+extern void tcpd_jump(); >X+#endif >X+ >X+struct tcpd_context { >X+ char *file; /* current file */ >X+ int line; /* current line */ >X+}; >X+extern struct tcpd_context tcpd_context; >X+ >X+ /* >X+ * While processing access control rules, error conditions are handled by >X+ * jumping back into the hosts_access() routine. This is cleaner than >X+ * checking the return value of each and every silly little function. The >X+ * (-1) returns are here because zero is already taken by longjmp(). >X+ */ >X+ >X+#define AC_PERMIT 1 /* permit access */ >X+#define AC_DENY (-1) /* deny_access */ >X+#define AC_ERROR AC_DENY /* XXX */ >X+ >X+ /* >X+ * In verification mode an option function should just say what it would do, >X+ * instead of really doing it. An option function that would not return >X+ * should clear the dry_run flag to inform the caller of this unusual >X+ * behavior. >X+ */ >X+ >X+extern void process_options(void); /* execute options */ >X+extern int dry_run; /* verification flag */ >X+ >X+/* Bug workarounds. */ >X+ >X+#ifdef INET_ADDR_BUG /* inet_addr() returns struct */ >X+#define inet_addr fix_inet_addr >X+extern long fix_inet_addr(void); >X+#endif >X+ >X+#ifdef BROKEN_FGETS /* partial reads from sockets */ >X+#define fgets fix_fgets >X+extern char *fix_fgets(void); >X+#endif >X+ >X+#ifdef RECVFROM_BUG /* no address family info */ >X+#define recvfrom fix_recvfrom >X+extern int fix_recvfrom(void); >X+#endif >X+ >X+#ifdef GETPEERNAME_BUG /* claims success with UDP */ >X+#define getpeername fix_getpeername >X+extern int fix_getpeername(void); >X+#endif >X+ >X+#ifdef SOLARIS_24_GETHOSTBYNAME_BUG /* lists addresses as aliases */ >X+#define gethostbyname fix_gethostbyname >X+extern struct hostent *fix_gethostbyname(void); >X+#endif >X+ >X+#ifdef USE_STRSEP /* libc calls strtok(void) */ >X+#define strtok fix_strtok >X+extern char *fix_strtok(void); >X+#endif >X+ >X+#ifdef LIBC_CALLS_STRTOK /* libc calls strtok() */ >X+#define strtok my_strtok >X+extern char *my_strtok(void); >X+#endif >X+ >X+#ifdef __cplusplus >X+} >X+#endif >b600496d6da74d757db8b526552a3c2f >echo x - apcctrl/files/patch-src_cgi_Makefile >sed 's/^X//' >apcctrl/files/patch-src_cgi_Makefile << '760dbc2f8e16fd0f11e0f9ab0021ae1c' >X--- src/cgi/Makefile.orig 2014-11-04 19:17:43 UTC >X+++ src/cgi/Makefile >X@@ -43,9 +43,9 @@ install-cgi: >X $(call INSTPROG,755,upsfstats.cgi,$(cgibin)) >X $(call INSTPROG,755,upsimage.cgi,$(cgibin)) >X $(call MKDIR,$(sysconfdir)) >X- $(call INSTNEW,644,apcctrl.css,$(sysconfdir)) >X- $(call INSTNEW,644,$(topdir)/platforms/etc/hosts.conf,$(sysconfdir)) >X- $(call INSTNEW,644,$(topdir)/platforms/etc/multimon.conf,$(sysconfdir)) >X+ $(call INSTDATA,644,apcctrl.css,$(sysconfdir)/apcctrl.css.sample) >X+ $(call INSTDATA,644,$(topdir)/platforms/etc/hosts.conf,$(sysconfdir)/hosts.conf.sample) >X+ $(call INSTDATA,644,$(topdir)/platforms/etc/multimon.conf,$(sysconfdir)/multimon.conf.sample) >X >X uninstall-cgi: >X $(call UNINST,$(cgibin)/multimon.cgi) >760dbc2f8e16fd0f11e0f9ab0021ae1c >echo x - apcctrl/files/pkg-message.in >sed 's/^X//' >apcctrl/files/pkg-message.in << '34d374cc5fdffeb7dc34ea67362947ca' >X[ >X{ type: install >X message: <<EOM >X >XProject Site: http://www.apcctrl.com.br >X >XUPS models from APC Brasil focused: >X >X - BACK-UPS BR 1200VA (BZ1200BI-BR) >X - BACK-UPS BR 1500VA (BZ1500PBI-BR) >X - BACK-UPS BR 2200VA (BZ2200BI-BR e BZ2200I-BR) >X - SMART-UPS BR 1000VA (SUA1000BI-BR e SOLIS1000BI) >X - SMART-UPS BR 1500VA (SUA1500BI-BR e SOLIS1500BI) >X - SMART-UPS BR 2000VA (SUA2000BI-BR) >X - SMART-UPS BR 3000VA (SUA3000BI-BR) >X - STAY 800 (PS800) >X - STAY 700 (PS700) >X >XSample files and scripts are installed in %%ETCDIR%%. >XPlease see %%ETCDIR%%/apcctrl.conf.sample for config >Xand 'man apcctrl.conf'. >X >XExamples: >X DEVICE /dev/ttyU0 or DEVICE /dev/ttyUSB.nobreak ... >X /dev/ttyUSB0 or /dev/ttyUSB1 or /dev/ttyUSB2 ... >X /dev/ttyACM0 or /dev/ttyACM1 or /dev/ttyACM2 ... >X >XAdd apcctrl_enable=YES to your /etc/rc.conf[.local] to have apcctrl >Xstarting up at boot time. >X >XFor default, apcctrl starts with `--kill-on-powerfail` parameter. >XPlease, read its man page, and if this is not the intended behavior you want, >Xchange it accordingly. >X >XIn some systems where the shutdown can take a while (like in bhyve environment), >Xyou may want to change this behavior as follows: >X >XSet apcctrl_flags="--term-on-powerfail" on your /etc/rc.conf[.local]. >X >XAdd this to /etc/rc.shutdown, after the "Insert other shutdown procedures here" >Xline: >X test -f /var/run/powerfail && /usr/local/sbin/apcctrl --hibernate >X or >X test -f /var/run/powerfail && /usr/local/sbin/apcctrl --power-off >X >XUser interfaces (see their man pages): >X - apcctrl >X - apctest >X - apcaccess >X - apccontrol >X >XEvent control: >X - %%ETCDIR%%/apccontrol: The apcctrl daemon calls this script >X that can be changed by the user to define how the server >X must react to shutdown, hibernate, send email, etc. >X >XEOM >X} >X] >34d374cc5fdffeb7dc34ea67362947ca >echo x - apcctrl/files/apcctrl.in >sed 's/^X//' >apcctrl/files/apcctrl.in << '63abf8790872250a07c88730196b3f48' >X#!/bin/sh >X# >X# $FreeBSD: head/sysutils/apcctrl/files/apcctrl.in 443914 2017-06-19 22:45:58Z dbaio $ >X# >X# PROVIDE: apcctrl >X# REQUIRE: SERVERS >X# BEFORE: DAEMON >X# KEYWORD: shutdown >X# >X# Add the following line to /etc/rc.conf[.local] to enable apcctrl >X# >X# apcctrl_enable (bool): Set to "NO" by default. >X# Set it to "YES" to enable apcctrl. >X# apcctrl_flags (str): Custom additional arguments to be passed >X# to apcctrl (default --kill-on-powerfail). >X# apcctrl_configs (str): A list of configs to run multiple instances. >X# >X >X. /etc/rc.subr >X >Xname=apcctrl >Xrcvar=apcctrl_enable >X >Xload_rc_config $name >X >X: ${apcctrl_enable="NO"} >X: ${apcctrl_flags="--kill-on-powerfail"} >X >Xpidfile=/var/run/${name}.pid >Xrequired_files="${apcctrl_configs:-%%ETCDIR%%/apcctrl.conf}" >Xcommand=%%PREFIX%%/sbin/${name} >Xrestart_cmd=${name}_restart_cmd >X >Xapcctrl_precmd() >X{ >X config=$1 >X >X dn="`/usr/bin/dirname ${pidfile}`" >X if [ -n "${config}" ]; then >X # Specific config >X base="`/usr/bin/basename ${config} .conf`" >X pidfile="${dn}/${base}.pid" >X command_args="-f ${config} -P ${pidfile}" >X else >X # Default config >X command_args="" >X fi >X} >X >Xapcctrl_restart_cmd() >X{ >X if [ -n "${apcctrl_configs}" ]; then >X # One or more named configs >X for config in ${apcctrl_configs}; do >X apcctrl_precmd ${config} >X run_rc_command stop >X done >X for config in ${apcctrl_configs}; do >X apcctrl_precmd ${config} >X run_rc_command start >X done >X else >X # Default config >X apcctrl_precmd >X run_rc_command stop >X run_rc_command start >X fi >X} >X >Xif [ "$1" = restart ]; then >X apcctrl_precmd >X run_rc_command $1 >Xelif [ -n "${apcctrl_configs}" ]; then >X # One or more named configs >X for config in ${apcctrl_configs}; do >X apcctrl_precmd ${config} >X run_rc_command $1 >X done >Xelse >X # Default config >X apcctrl_precmd >X run_rc_command $1 >Xfi >63abf8790872250a07c88730196b3f48 >echo x - apcctrl/pkg-message >sed 's/^X//' >apcctrl/pkg-message << 'ae9544e155ce030dac5d5666395e5446' >X[ >X{ >X message: <<EOM >X >XThis port is an exact match of sysutils/apcupsd, with the >Xaddition of the Brazil driver to support the following models: >X >X - BACK-UPS BR 1200VA (BZ1200BI-BR) >X - BACK-UPS BR 1500VA (BZ1500PBI-BR) >X - BACK-UPS BR 2200VA (BZ2200BI-BR e BZ2200I-BR) >X - SMART-UPS BR 1000VA (SUA1000BI-BR e SOLIS1000BI) >X - SMART-UPS BR 1500VA (SUA1500BI-BR e SOLIS1500BI) >X - SMART-UPS BR 2000VA (SUA2000BI-BR) >X - SMART-UPS BR 3000VA (SUA3000BI-BR) >X - STAY 800 (PS800) >X - STAY 700 (PS700) >X >XAuthor: Wagner Popov dos Santos >X wpopov@gmail.com >X >XWWW: http://www.apcctrl.com.br >X >X >XEOM >X type: install >X} >X] >ae9544e155ce030dac5d5666395e5446 >exit >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 241623
: 208746