ports/contrib (3.7): nut: change pidpath to /run, remove obsolete dependency tcp_wrappers
commit 818779ca580e4ddc80dd03fe49a724c2ccc4a01e Author: John McQuah <jmcquah@disroot.org> Date: Mon Jan 23 21:03:44 2023 -0500 nut: change pidpath to /run, remove obsolete dependency tcp_wrappers diff --git a/nut/.signature b/nut/.signature index 9bbe5fb04..c735bf249 100644 --- a/nut/.signature +++ b/nut/.signature @@ -1,6 +1,6 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF30lJ0npy0cpovkfPqPlMevS6BkDwMYTJQFHcfeKhgV4dN2E73HiQgq7UsPPasCXc9B9Eyx4TC7Bslok+Bdl6kwc= -SHA256 (Pkgfile) = 412628f924f4f22191629b9c9f43155840879f8f99477d8fd696bb4a3dc45e12 +RWSagIOpLGJF3/nuZDWNHEnYuQPWlZofrpfzmGXN2Ynosgu59IrhCNW/fUsIF1fl2RPuiVOHdPcRP6Dd2L5SL1InAdpLAIf/sQY= +SHA256 (Pkgfile) = 0d1dc234365e50eccc29b924172d9ca615d5bb921c175de91488a9dbb25e59e9 SHA256 (.footprint) = d81ef8f38c18b2f891e30c523400bd9b5b3abe8e8bfc31b5cb6c0c8013d493ef SHA256 (nut-2.8.0.tar.gz) = c3e5a708da797b7c70b653d37b1206a000fcb503b85519fe4cdf6353f792bfe5 SHA256 (upsd) = 3aef2c1ea325ef9b7d799d244a4fd633ec378e963776bf643273c9d6ee83172a diff --git a/nut/Pkgfile b/nut/Pkgfile index 9488549d8..2220c3f4c 100644 --- a/nut/Pkgfile +++ b/nut/Pkgfile @@ -1,7 +1,8 @@ # Description: Network UPS Tools. Monitor of UPS hardware. # URL: http://www.networkupstools.org/ # Maintainer: Danny Rawlins, crux at romster dot me -# Depends on: libusb openssl tcp_wrappers +# Depends on: libusb openssl +# Optional: avahi neon nss name=nut version=2.8.0 @@ -16,6 +17,7 @@ build() { --prefix=/usr \ --with-user=nut \ --with-group=nut \ + --with-pidpath=/run \ --sysconfdir=/etc/$name \ --datadir=/usr/share/$name \ --localstatedir=/var/$name diff --git a/nut/pre-install b/nut/pre-install index e91ffdb31..21fb92be2 100755 --- a/nut/pre-install +++ b/nut/pre-install @@ -1,42 +1,6 @@ #!/bin/sh -# Created by Danny Rawlins, monster dot romster at gmail dot com - -GROUP=nut -USER=nut -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 || /usr/sbin/groupadd nut +getent passwd nut || /usr/sbin/useradd -d /var/empty -g nut \ + -c "Network UPS Tools" -s /bin/sh nut +/usr/bin/passwd -l nut
participants (1)
-
crux@crux.nu