diff options
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/mgeupsd/Makefile | 27 | ||||
-rw-r--r-- | sysutils/mgeupsd/distinfo | 2 | ||||
-rw-r--r-- | sysutils/mgeupsd/files/mgeupsd.sh | 15 | ||||
-rw-r--r-- | sysutils/mgeupsd/files/patch-Makefile | 21 | ||||
-rw-r--r-- | sysutils/mgeupsd/files/patch-mgeupsd.c | 47 | ||||
-rw-r--r-- | sysutils/mgeupsd/files/pkg-message.in | 12 | ||||
-rw-r--r-- | sysutils/mgeupsd/files/powerhandler | 36 | ||||
-rw-r--r-- | sysutils/mgeupsd/pkg-descr | 8 |
9 files changed, 0 insertions, 169 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index a769acda9b1e..e47b6a5e3580 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -731,7 +731,6 @@ SUBDIR += memtester SUBDIR += metalog SUBDIR += mfid - SUBDIR += mgeupsd SUBDIR += minikube SUBDIR += minimunin SUBDIR += minipot diff --git a/sysutils/mgeupsd/Makefile b/sysutils/mgeupsd/Makefile deleted file mode 100644 index 0af2c3196202..000000000000 --- a/sysutils/mgeupsd/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -PORTNAME= mgeupsd -PORTVERSION= 0.3 -PORTREVISION= 2 -CATEGORIES= sysutils -MASTER_SITES= SUNSITE/system/ups - -MAINTAINER= ports@FreeBSD.org -COMMENT= Monitor a state of MGE Pulsar UPS connected to RS-232 port - -DEPRECATED= Last release is 23 years old. It is not clear what devices are supported. -EXPIRATION_DATE= 2022-07-25 - -USES= gmake -WRKSRC= ${WRKDIR}/MGE - -PLIST_FILES= man/man8/${PORTNAME}.8.gz sbin/mgeupsd sbin/powerhandler etc/rc.d/mgeupsd.sh -SUB_FILES= pkg-message - -post-patch: - @${REINPLACE_CMD} -e '/^CC=/s:gcc:${CC}:' \ - -e '/^CFLAGS=/s:-Wall -O2:${CFLAGS}:' ${WRKSRC}/Makefile - -post-install: - ${INSTALL_SCRIPT} ${FILESDIR}/mgeupsd.sh ${STAGEDIR}${PREFIX}/etc/rc.d - ${INSTALL_SCRIPT} ${FILESDIR}/powerhandler ${STAGEDIR}${PREFIX}/sbin - -.include <bsd.port.mk> diff --git a/sysutils/mgeupsd/distinfo b/sysutils/mgeupsd/distinfo deleted file mode 100644 index fc6264df7d7b..000000000000 --- a/sysutils/mgeupsd/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (mgeupsd-0.3.tar.gz) = 77ba3b8b4b08c5d03bcc7a921fb9a3fe5ee839d0d1e9009e7ff4641b7beafd3a -SIZE (mgeupsd-0.3.tar.gz) = 9196 diff --git a/sysutils/mgeupsd/files/mgeupsd.sh b/sysutils/mgeupsd/files/mgeupsd.sh deleted file mode 100644 index dfaa7794f965..000000000000 --- a/sysutils/mgeupsd/files/mgeupsd.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -if [ "X${1}" = "Xstart" ] -then - /usr/local/sbin/mgeupsd -run /usr/local/sbin/powerhandler /dev/cuaa0 - echo -n ' mgeupsd' -elif [ "X${1}" = "Xstop" ] -then - kill `cat /var/run/mgeupsd.pid` - rm -f /var/run/mgeupsd.pid - rm -f /var/run/powerstatus - echo -n ' mgeupsd' -else - echo "Usage: `basename $0` { start | stop }" - exit 1 -fi diff --git a/sysutils/mgeupsd/files/patch-Makefile b/sysutils/mgeupsd/files/patch-Makefile deleted file mode 100644 index df3a7df9f56c..000000000000 --- a/sysutils/mgeupsd/files/patch-Makefile +++ /dev/null @@ -1,21 +0,0 @@ ---- Makefile.orig 1998-12-25 09:10:57 UTC -+++ Makefile -@@ -1,5 +1,5 @@ --CC=gcc --CFLAGS=-Wall -O2 -+CC=cc -+CFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing - LDFLAGS=-s - - all: mgeupsd -@@ -8,8 +8,8 @@ mgeupsd: mgeupsd.o - $(CC) $(LDFLAGS) -o $@ $< - - install: mgeupsd -- install mgeupsd /sbin -- install mgeupsd.8 /usr/man/man8 -+ install -c mgeupsd $(DESTDIR)${PREFIX}/sbin -+ install -c mgeupsd.8 $(DESTDIR)${PREFIX}/man/man8 - - clean: - rm -f *.o mgeupsd diff --git a/sysutils/mgeupsd/files/patch-mgeupsd.c b/sysutils/mgeupsd/files/patch-mgeupsd.c deleted file mode 100644 index e23d4c77bdfc..000000000000 --- a/sysutils/mgeupsd/files/patch-mgeupsd.c +++ /dev/null @@ -1,47 +0,0 @@ ---- mgeupsd.c.orig 1998-12-26 10:42:52 UTC -+++ mgeupsd.c -@@ -33,9 +33,9 @@ int RTS = TIOCM_RTS, use_syslog = 0; - #define BS_TDP 12 - - /* status file for init */ --#define PWRFILE "/etc/powerstatus" -+#define PWRFILE "/var/run/powerstatus" - /* Linux usual */ --#define LOCKDIR "/var/lock" -+#define LOCKDIR "/var/run" - #define RUNDIR "/var/run" - char lockfile[40] = {0,}; - char pidfile[40] = {0,}; -@@ -640,7 +640,7 @@ operate: - else - { - #ifndef TEST -- if (kill (init_pid, SIGPWR)) -+ if (kill (init_pid, SIGUSR2)) - syslog (LOG_CRIT, "Process %u doesn not exist! Can't send SIGPWR", init_pid); - #endif - } -@@ -677,7 +677,7 @@ operate: - else - { - #ifndef TEST -- if (kill (init_pid, SIGPWR)) -+ if (kill (init_pid, SIGINT)) - syslog (LOG_CRIT, "Process %u doesn not exist! Can't send SIGPWR", init_pid); - #endif - } -@@ -711,7 +711,7 @@ operate: - else - { - #ifndef TEST -- if (kill (init_pid, SIGPWR)) -+ if (kill (init_pid, SIGHUP)) - syslog (LOG_CRIT, "Process %u doesn not exist! Can't send SIGPWR", init_pid); - #endif - } -@@ -758,4 +758,5 @@ operate: - } - } /* while(1) */ - } -+ return 0; - } diff --git a/sysutils/mgeupsd/files/pkg-message.in b/sysutils/mgeupsd/files/pkg-message.in deleted file mode 100644 index 65e76ff30e7c..000000000000 --- a/sysutils/mgeupsd/files/pkg-message.in +++ /dev/null @@ -1,12 +0,0 @@ -[ -{ type: install - message: <<EOM -A configuration file has been installed in %%PREFIX%%/etc/rc.d/mgeupsd.sh. -Examine it to make sure it is suitable for your system. - -A sample script that handles the various power messages has been placed in -%%PREFIX%%/sbin/powerhandler. You will probably want to edit it to suit -your particular needs. -EOM -} -] diff --git a/sysutils/mgeupsd/files/powerhandler b/sysutils/mgeupsd/files/powerhandler deleted file mode 100644 index 5f47600d4ebc..000000000000 --- a/sysutils/mgeupsd/files/powerhandler +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -PATH=${PATH}:/sbin:/usr/sbin:/usr/local/sbin;export PATH - -STATUS=`cat ${1}` -L="logger -i -t powerhandler" - -${L} "Status message received: ${STATUS}" - -if [ "X${STATUS}" = "XFAIL" ] -then - ${L} "Power loss detected, initiating shutdown" - # we are shutting down... give users some warning - shutdown -h +5 "POWER FAILURE DETECTED... initiating emergency shutdown... SAVE YOUR WORK NOW AND LOGOFF!!!" -elif [ "X${STATUS}" = "XLOWBATT" ] -then - ${L} "Battery is critical, initiating IMMEDIATE shutdown" - # battery is low.. shut down NOW! - # first nix any shutdown processes - killall shutdown - shutdown -h now "BATTERY IS LOW... SHUTTING DOWN **IMMEDIATELY**..." -elif [ "X${STATUS}" = "XOK" ] -then - ${L} "Power has been restored, canceling shutdown" - # everything's ok... cancel the shutdown - killall shutdown - rm -f /var/run/nologin - wall << _EOF_ -System power has been restored. -The shutdown procedure has been canceled. -_EOF_ -else - # unknown state... help! - ${L} "this shouldn't be happening!" - exit 1 -fi diff --git a/sysutils/mgeupsd/pkg-descr b/sysutils/mgeupsd/pkg-descr deleted file mode 100644 index 8a7e139ad632..000000000000 --- a/sysutils/mgeupsd/pkg-descr +++ /dev/null @@ -1,8 +0,0 @@ -mgeupsd is a daemon process that sits in the background and check -state of the UPS every 10 (by default) seconds. As soon as mgeupsd -senses that the power is failing it notifies init(8) and init will -execute the powerwait and powerfail entries. If mgeupsd senses that -the power has been restored, it notifies init again and init will exe- -cute the powerokwait entries. If mgeupsd senses that the UPS batteries -has less than 20% of its energy it notifies init again and init will -execute the powerfailnow entries. |