summaryrefslogtreecommitdiff
path: root/nut
diff options
context:
space:
mode:
authorDanny Rawlins <monster.romster@gmail.com>2010-06-30 22:53:20 +1000
committerDanny Rawlins <monster.romster@gmail.com>2010-06-30 22:53:20 +1000
commite00270dd1c6870552094473e93dd6f81b4ef796b (patch)
tree7b71ab4a1cb2a3a21fb357921ab3895b8ffddf0b /nut
parentf07fab88cedc1a555606d198931c78f159504c79 (diff)
downloadcontrib-e00270dd1c6870552094473e93dd6f81b4ef796b.tar.gz
contrib-e00270dd1c6870552094473e93dd6f81b4ef796b.tar.xz
nut: 2.2.2 -> 2.4.3
Diffstat (limited to 'nut')
-rw-r--r--nut/.footprint51
-rw-r--r--nut/.md5sum4
-rw-r--r--nut/Pkgfile62
-rw-r--r--nut/README2
-rwxr-xr-x[-rw-r--r--]nut/pre-install45
-rw-r--r--nut/upsd12
6 files changed, 111 insertions, 65 deletions
diff --git a/nut/.footprint b/nut/.footprint
index 1edfaa892..2ec666182 100644
--- a/nut/.footprint
+++ b/nut/.footprint
@@ -1,53 +1,58 @@
drwxr-xr-x root/root etc/
-drwxr-xr-x root/root etc/hotplug/
-drwxr-xr-x root/root etc/hotplug/usb/
--rw-r--r-- root/root etc/hotplug/usb/libhid.usermap
--rwxr-xr-x root/root etc/hotplug/usb/libhidups
drwxr-xr-x root/root etc/nut/
--rw-r--r-- root/root etc/nut/ups.conf.sample
--rw-r--r-- root/root etc/nut/upsd.conf.sample
--rw-r--r-- root/root etc/nut/upsd.users.sample
--rw-r--r-- root/root etc/nut/upsmon.conf.sample
--rw-r--r-- root/root etc/nut/upssched.conf.sample
+-rw-r--r-- root/nut etc/nut/nut.conf.sample
+-rw-r--r-- root/nut etc/nut/ups.conf.sample
+-rw-r--r-- root/nut etc/nut/upsd.conf.sample
+-rw-r--r-- root/nut etc/nut/upsd.users.sample
+-rw-r--r-- root/nut etc/nut/upsmon.conf.sample
+-rw-r--r-- root/nut etc/nut/upssched.conf.sample
drwxr-xr-x root/root etc/rc.d/
--rwxr-xr-x root/root etc/rc.d/upsd
+-rwxr-xr-- root/root etc/rc.d/upsd
drwxr-xr-x root/root etc/udev/
drwxr-xr-x root/root etc/udev/rules.d/
--rw-r--r-- root/root etc/udev/rules.d/52_nut-usbups.rules
+drwxr-xr-x root/root lib/
+drwxr-xr-x root/root lib/udev/
+drwxr-xr-x root/root lib/udev/rules.d/
+-rw-r--r-- root/root lib/udev/rules.d/52-nut-usbups.rules
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
--rwxr-xr-x root/root usr/bin/al175
-rwxr-xr-x root/root usr/bin/apcsmart
-rwxr-xr-x root/root usr/bin/bcmxcp
-rwxr-xr-x root/root usr/bin/bcmxcp_usb
-rwxr-xr-x root/root usr/bin/belkin
-rwxr-xr-x root/root usr/bin/belkinunv
-rwxr-xr-x root/root usr/bin/bestfcom
+-rwxr-xr-x root/root usr/bin/bestfortress
-rwxr-xr-x root/root usr/bin/bestuferrups
-rwxr-xr-x root/root usr/bin/bestups
--rwxr-xr-x root/root usr/bin/cpsups
--rwxr-xr-x root/root usr/bin/cyberpower
+-rwxr-xr-x root/root usr/bin/blazer_ser
+-rwxr-xr-x root/root usr/bin/blazer_usb
+-rwxr-xr-x root/root usr/bin/clone
+-rwxr-xr-x root/root usr/bin/clone-outlet
-rwxr-xr-x root/root usr/bin/dummy-ups
--rwxr-xr-x root/root usr/bin/energizerups
-rwxr-xr-x root/root usr/bin/etapro
-rwxr-xr-x root/root usr/bin/everups
-rwxr-xr-x root/root usr/bin/gamatronic
-rwxr-xr-x root/root usr/bin/genericups
-rwxr-xr-x root/root usr/bin/isbmex
+-rwxr-xr-x root/root usr/bin/ivtscd
-rwxr-xr-x root/root usr/bin/liebert
+-rwxr-xr-x root/root usr/bin/liebertgxt2
-rwxr-xr-x root/root usr/bin/masterguard
-rwxr-xr-x root/root usr/bin/megatec
-rwxr-xr-x root/root usr/bin/megatec_usb
-rwxr-xr-x root/root usr/bin/metasys
-rwxr-xr-x root/root usr/bin/mge-shut
-rwxr-xr-x root/root usr/bin/mge-utalk
+-rwxr-xr-x root/root usr/bin/microdowell
+-rwxr-xr-x root/root usr/bin/netxml-ups
-rwxr-xr-x root/root usr/bin/newmge-shut
--rwxr-xr-x root/root usr/bin/nitram
-rwxr-xr-x root/root usr/bin/oneac
-rwxr-xr-x root/root usr/bin/optiups
-rwxr-xr-x root/root usr/bin/powercom
-rwxr-xr-x root/root usr/bin/powerpanel
-rwxr-xr-x root/root usr/bin/rhino
+-rwxr-xr-x root/root usr/bin/richcomm_usb
-rwxr-xr-x root/root usr/bin/safenet
-rwxr-xr-x root/root usr/bin/skel
-rwxr-xr-x root/root usr/bin/solis
@@ -72,44 +77,48 @@ drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man1/
drwxr-xr-x root/root usr/man/man3/
drwxr-xr-x root/root usr/man/man5/
+-rw-r--r-- root/root usr/man/man5/nut.conf.5.gz
-rw-r--r-- root/root usr/man/man5/ups.conf.5.gz
-rw-r--r-- root/root usr/man/man5/upsd.conf.5.gz
-rw-r--r-- root/root usr/man/man5/upsd.users.5.gz
-rw-r--r-- root/root usr/man/man5/upsmon.conf.5.gz
-rw-r--r-- root/root usr/man/man5/upssched.conf.5.gz
drwxr-xr-x root/root usr/man/man8/
--rw-r--r-- root/root usr/man/man8/al175.8.gz
-rw-r--r-- root/root usr/man/man8/apcsmart.8.gz
-rw-r--r-- root/root usr/man/man8/bcmxcp.8.gz
-rw-r--r-- root/root usr/man/man8/bcmxcp_usb.8.gz
-rw-r--r-- root/root usr/man/man8/belkin.8.gz
-rw-r--r-- root/root usr/man/man8/belkinunv.8.gz
-rw-r--r-- root/root usr/man/man8/bestfcom.8.gz
+-rw-r--r-- root/root usr/man/man8/bestfortress.8.gz
-rw-r--r-- root/root usr/man/man8/bestuferrups.8.gz
-rw-r--r-- root/root usr/man/man8/bestups.8.gz
--rw-r--r-- root/root usr/man/man8/cpsups.8.gz
--rw-r--r-- root/root usr/man/man8/cyberpower.8.gz
+-rw-r--r-- root/root usr/man/man8/blazer.8.gz
+-rw-r--r-- root/root usr/man/man8/clone.8.gz
-rw-r--r-- root/root usr/man/man8/dummy-ups.8.gz
--rw-r--r-- root/root usr/man/man8/energizerups.8.gz
-rw-r--r-- root/root usr/man/man8/etapro.8.gz
-rw-r--r-- root/root usr/man/man8/everups.8.gz
-rw-r--r-- root/root usr/man/man8/gamatronic.8.gz
-rw-r--r-- root/root usr/man/man8/genericups.8.gz
-rw-r--r-- root/root usr/man/man8/isbmex.8.gz
+-rw-r--r-- root/root usr/man/man8/ivtscd.8.gz
-rw-r--r-- root/root usr/man/man8/liebert.8.gz
+-rw-r--r-- root/root usr/man/man8/liebertgxt2.8.gz
-rw-r--r-- root/root usr/man/man8/masterguard.8.gz
-rw-r--r-- root/root usr/man/man8/megatec.8.gz
-rw-r--r-- root/root usr/man/man8/megatec_usb.8.gz
-rw-r--r-- root/root usr/man/man8/metasys.8.gz
-rw-r--r-- root/root usr/man/man8/mge-shut.8.gz
-rw-r--r-- root/root usr/man/man8/mge-utalk.8.gz
--rw-r--r-- root/root usr/man/man8/nitram.8.gz
+-rw-r--r-- root/root usr/man/man8/microdowell.8.gz
+-rw-r--r-- root/root usr/man/man8/netxml-ups.8.gz
-rw-r--r-- root/root usr/man/man8/nutupsdrv.8.gz
-rw-r--r-- root/root usr/man/man8/oneac.8.gz
-rw-r--r-- root/root usr/man/man8/optiups.8.gz
-rw-r--r-- root/root usr/man/man8/powercom.8.gz
-rw-r--r-- root/root usr/man/man8/powerpanel.8.gz
-rw-r--r-- root/root usr/man/man8/rhino.8.gz
+-rw-r--r-- root/root usr/man/man8/richcomm_usb.8.gz
-rw-r--r-- root/root usr/man/man8/safenet.8.gz
-rw-r--r-- root/root usr/man/man8/solis.8.gz
-rw-r--r-- root/root usr/man/man8/tripplite.8.gz
diff --git a/nut/.md5sum b/nut/.md5sum
index 84520e812..e85064df5 100644
--- a/nut/.md5sum
+++ b/nut/.md5sum
@@ -1,2 +1,2 @@
-677a84a83e9be7bc93610413ee696375 nut-2.2.2.tar.gz
-a59134dfe9c5558a615bf7237564de43 upsd
+6f893b61b07915e7a139324fa3f79121 nut-2.4.3.tar.gz
+f470b060555f65af23e5053a97efeb74 upsd
diff --git a/nut/Pkgfile b/nut/Pkgfile
index 0dca00c7c..e5a993c07 100644
--- a/nut/Pkgfile
+++ b/nut/Pkgfile
@@ -1,39 +1,41 @@
# Description: Network UPS Tools. Monitor of UPS hardware.
# URL: http://www.networkupstools.org/
-# Maintainer: Victor Martinez, pitillo at ono dot com
+# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
+# Packager: Victor Martinez, pitillo at ono dot com
# Depends on:
name=nut
-version=2.2.2
+version=2.4.3
release=1
-source=(http://www.networkupstools.org/source/2.2/$name-$version.tar.gz \
- upsd)
+source=(http://www.networkupstools.org/source/${version%.*}/$name-$version.tar.gz
+ upsd)
build() {
- cd $name-$version
- ./configure --prefix=/usr \
- --disable-nls \
- --with-user=nut \
- --with-group=nut \
- --with-usb \
- --with-lib \
- --mandir=/usr/man \
- --sysconfdir=/etc/$name \
- --sbindir=/usr/sbin/ \
- --datadir=/usr/share/$name \
- --localstatedir=/var/$name
- make
- make usb
- make DESTDIR=$PKG install
- make DESTDIR=$PKG/etc/nut/ install-conf
- rm -r $PKG/etc/nut/etc/
- rmdir $PKG/usr/{lib/pkgconfig,include}
- #if you dont want config templates uncomment the next line
- #rm $PKG/etc/nut/*
- mkdir -p $PKG/etc/udev/rules.d/
- install -D -m 755 $SRC/upsd $PKG/etc/rc.d/upsd
- rmdir $PKG/usr/cgi-bin $PKG/usr/html
- mkdir -p $PKG/var/state/ups
- chmod 0770 $PKG/var/state/ups
- chown root:nut $PKG/var/state/ups
+ cd $name-$version
+
+ ./configure \
+ --prefix=/usr \
+ --with-user=root \
+ --with-group=nut \
+ --mandir=/usr/man \
+ --sysconfdir=/etc/$name \
+ --datadir=/usr/share/$name \
+ --localstatedir=/var/$name
+
+ make
+ make DESTDIR=$PKG install
+
+ rmdir \
+ $PKG/usr/lib/pkgconfig \
+ $PKG/usr/include \
+ $PKG/usr/cgi-bin \
+ $PKG/usr/html
+
+ #if you dont want config templates uncomment the next line
+ #rm $PKG/etc/nut/*
+
+ find $PKG/etc/nut -type f -print0 | xargs -0 chown root:nut
+ install -d $PKG/etc/udev/rules.d
+ install -d -m 0770 -o root -g nut $PKG/var/state/ups
+ install -D -m 0754 $SRC/upsd $PKG/etc/rc.d/upsd
}
diff --git a/nut/README b/nut/README
index 92ee8c503..bc139f74b 100644
--- a/nut/README
+++ b/nut/README
@@ -19,5 +19,3 @@ chown root:nut upsd.conf upsd.users
chmod 0640 upsd.conf upsd.users
- Remember to use man to setup nut.
-
-Víctor Martínez <pitillo at ono dot com>
diff --git a/nut/pre-install b/nut/pre-install
index 477b0c777..9f50158a5 100644..100755
--- a/nut/pre-install
+++ b/nut/pre-install
@@ -1,5 +1,42 @@
-#!/bin/bash
+#!/bin/sh
+
+# Created by Danny Rawlins, monster dot romster at gmail dot com
+
+GROUP=nut
+USER=root
+USER_COMMENT="Network UPS Tools"
+USER_HOME=/var/empty
+USER_SHELL=/bin/sh
+
+if [ ! $(id -u) = 0 ]; then
+ echo "ERROR: you need to be root to run this!"
+ exit 1
+fi
+
+if [ $GROUP ]; then
+ if ! getent group $GROUP > /dev/null; then
+ /usr/sbin/groupadd $GROUP
+ if [ $? -eq 0 ]; then
+ echo "Group: $GROUP added."
+ fi
+ else
+ echo "Group: $GROUP already exists! Skipping."
+ fi
+fi
+
+if ! getent passwd $USER > /dev/null; then
+ /usr/sbin/useradd -g $GROUP -c "$USER_COMMENT" -d $USER_HOME -s $USER_SHELL $USER
+ if [ $? -eq 0 ]; then
+ echo "User: $USER added."
+ /usr/bin/passwd -l $USER > /dev/null
+ if [ $? -eq 0 ]; then
+ echo "Locked: $USER account."
+ fi
+ else
+ echo "ERROR: unable to lock $USER account."
+ /usr/sbin/userdel $USER
+ fi
+ else
+ echo "User: $USER already exists! Skipping."
+fi
-getent group nut || groupadd nut
-getent passwd nut || useradd -m -g nut -d /var/empty -s /bin/false nut
-passwd -l nut
diff --git a/nut/upsd b/nut/upsd
index 7ce8e7a37..815d631bf 100644
--- a/nut/upsd
+++ b/nut/upsd
@@ -1,24 +1,24 @@
#!/bin/sh
#
-# /etc/rc.d/upsd: start/stop ups daemons
+# /etc/rc.d/upsd: start/stop ups daemon
#
case "$1" in
start)
/usr/bin/upsdrvctl start
- /usr/sbin/upsd
+ /usr/sbin/upsd
;;
stop)
- /usr/sbin/upsd -c stop
+ /usr/sbin/upsd -c stop
;;
restart)
$0 stop
sleep 1
$0 start
- ;;
+ ;;
*)
- echo "Usage: $0 [start|stop]"
- exit 1
+ echo "Usage: $0 [start|stop|restart]"
+ exit 1
esac
# End of file

Generated by cgit