ports/contrib (3.2): net-snmp: removed post-install script
commit cc3c0c64db57b0881e47b9a00d7bf4692973104b Author: Fredrik Rinnestam <fredrik@crux.nu> Date: Wed Aug 5 22:07:41 2015 +0200 net-snmp: removed post-install script diff --git a/net-snmp/post-install b/net-snmp/post-install deleted file mode 100644 index 34a3149..0000000 --- a/net-snmp/post-install +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# - add $ADD_USER user, $ADD_GROUP group -# - change files permissions -# - reflect changes in config -# -# We'll assume 'passwd', 'group' and 'shadow' files are in sync. - -ADD_GID=72 -ADD_UID=72 -ADD_USER=snmpd -ADD_USER_HOME=/var/empty -ADD_USER_SHELL=/bin/false -ADD_GROUP=snmpd - -ADD_STATUS=0 -if [ -z `getent group | gawk -F: '{ print $1 }' | grep ^$ADD_GROUP$` ]; then - while [ `getent group | gawk -F: '{ print $3 }' | grep ^$ADD_GID$` ] - do - let ADD_GID+=1 - done - /usr/sbin/groupadd -g $ADD_GID $ADD_GROUP || exit 1 - echo "$0: Created $ADD_GROUP group, GID=$ADD_GID" - else - echo "$0: $ADD_GROUP group already exists, trying to create user..." -fi - -if [ -z `getent passwd | gawk -F: '{ print $1 }' | grep ^$ADD_USER$` ]; then - while [ `getent passwd | gawk -F: '{ print $3 }' | grep ^$ADD_UID$` ] - do - let ADD_UID+=1 - done - /usr/sbin/useradd -d $ADD_USER_HOME -s $ADD_USER_SHELL -u $ADD_UID -g $ADD_GROUP $ADD_USER || exit 1 - echo "$0: Created $ADD_USER user, UID=$ADD_UID" - else - echo $0: "$ADD_USER user already exists" - if [[ `getent passwd | grep ^$ADD_USER: | gawk -F: '{ print $4 }'` != `getent group | grep ^$ADD_GROUP: | gawk -F: '{ print $3 }'` ]]; then - echo "$0: existing $ADD_USER user is not in $ADD_GROUP group (fix it by hand)." - ADD_STAUS=2 - fi -fi - -# additional -sed -i s/"\-u\ daemon\ \-g\ daemon"/"\-u\ $ADD_USER\ \-g\ $ADD_GROUP"/ /etc/rc.d/snmpd -chown -R $ADD_USER:$ADD_GROUP $PKG/var/{lib,run,log}/snmp - -exit $ADD_STATUS
participants (1)
-
crux@crux.nu