diff options
author | Brian Bidulock | 2014-05-08 17:17:46 -0600 |
---|---|---|
committer | Brian Bidulock | 2015-06-10 07:10:57 -0600 |
commit | 46406b952943eee2dbaa5df941ea5c12f2811246 (patch) | |
tree | b7ef1e3d16fd5cf85b6d66b14a4b831e821dbd75 | |
parent | a4a12027010912702548c622d6819595d63a64b9 (diff) | |
download | aur-46406b952943eee2dbaa5df941ea5c12f2811246.tar.gz |
version 0.7.8.12-2
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | lldpd.install | 21 |
3 files changed, 21 insertions, 8 deletions
@@ -1,7 +1,7 @@ pkgbase = lldpd-git pkgdesc = LLDP daemon for GNU/Linux implementing both reception and sending pkgver = 0.7.8.12 - pkgrel = 1 + pkgrel = 2 url = http://vincentbernat.github.io/lldpd/ install = lldpd.install arch = i686 @@ -23,7 +23,7 @@ pkgbase = lldpd-git source = LICENSE md5sums = SKIP md5sums = 73eaa8101f84e787138aee3927455c36 - md5sums = 76d6b0e0d5d0de3718dbca898d0db270 + md5sums = 18d76cccdbbfed66c9c39232dd5f81ae md5sums = 8ae98663bac55afe5d989919d296f28a pkgname = lldpd-git @@ -2,7 +2,7 @@ pkgname=lldpd-git pkgver=0.7.8.12 -pkgrel=1 +pkgrel=2 pkgdesc="LLDP daemon for GNU/Linux implementing both reception and sending" arch=('i686' 'x86_64') url="http://vincentbernat.github.io/lldpd/" @@ -20,7 +20,7 @@ source=("$pkgname::git+https://github.com/vincentbernat/lldpd.git" 'LICENSE') md5sums=('SKIP' '73eaa8101f84e787138aee3927455c36' - '76d6b0e0d5d0de3718dbca898d0db270' + '18d76cccdbbfed66c9c39232dd5f81ae' '8ae98663bac55afe5d989919d296f28a') pkgver() { diff --git a/lldpd.install b/lldpd.install index 50f861fa4815..36bd97cac055 100644 --- a/lldpd.install +++ b/lldpd.install @@ -1,14 +1,27 @@ post_install(){ - usr/bin/groupadd -g 142 lldpd - usr/bin/useradd -u 142 -g lldpd -d /run/lldpd -s /bin/false lldpd + # new password and equal group allocated in system range + usr/bin/getent passwd lldpd >/dev/null 2>&1 || \ + usr/bin/useradd -K SYS_UID_MIN=100 -K SYS_UID_MAX=499 \ + -K SYS_GID_MIN=100 -K SYS_GID_MAX=499 \ + -K USERGROUPS_ENAB=yes -r -U -d /run/lldpd -s /bin/false lldpd } post_upgrade(){ + local changed # old user name and group was _lldpd usr/bin/getent passwd _lldpd >/dev/null 2>&1 && usr/bin/userdel _lldpd usr/bin/getent group _lldpd >/dev/null 2>&1 && usr/bin/groupdel _lldpd - usr/bin/getent group lldpd >/dev/null 2>&1 || usr/bin/groupadd -g 142 lldpd - usr/bin/getent passwd lldpd >/dev/null 2>&1 || usr/bin/useradd -u 142 -g lldpd -d /run/lldpd -s /bin/false lldpd + # get rid of old 142 uid and gid + usr/bin/getent passwd 142 >/dev/null 2>&1 && usr/bin/userdel lldpd + usr/bin/getent group 142 >/dev/null 2>&1 && usr/bin/groupdel lldpd + # new password and equal group allocated in system range + usr/bin/getent passwd lldpd >/dev/null 2>&1 || { + usr/bin/useradd -K SYS_UID_MIN=100 -K SYS_UID_MAX=499 \ + -K SYS_GID_MIN=100 -K SYS_GID_MAX=499 \ + -K USERGROUPS_ENAB=yes -r -U -d /run/lldpd -s /bin/false lldpd + echo "==> lldpd uid/gid could have changed" + echo "==> consider $> systemctl try-restart lldpd.service" + } } post_remove(){ |