new upstream 2.8.0

This commit is contained in:
lagertonne 2022-06-29 12:37:36 +02:00
parent fc7f4b43c1
commit b2b0c9995a
836 changed files with 137090 additions and 30018 deletions

23
scripts/Solaris/preinstall.in Executable file
View file

@ -0,0 +1,23 @@
#!/bin/sh
# Preinstall script for Network UPS Tools package
NUT_DIR="@prefix@"
# Create group nut
grep -w "@RUN_AS_GROUP@" /etc/group
if [ "$?" != 0 ]; then
/usr/sbin/groupadd "@RUN_AS_GROUP@"
fi
# Create user for installing "Network UPS Tools"
grep -w "@RUN_AS_USER@" /etc/passwd
if [ "$?" != 0 ]; then
/usr/sbin/useradd -c "Network UPS Tools" -g "@RUN_AS_GROUP@" -G root -d "@STATEPATH@" -s /bin/false "@RUN_AS_USER@"
fi
res="`groups "@RUN_AS_GROUP@" | grep -w "@RUN_AS_USER@"`" || res=""
if [ -z "$res" ]; then
/usr/sbin/usermod -g "@RUN_AS_GROUP@" -G root "@RUN_AS_USER@"
fi