Fix radvd account creation

This commit is contained in:
Petr Písař 2012-04-03 18:06:26 +02:00
parent 4cc2f549f5
commit cca9be20b1

View File

@ -1,4 +1,3 @@
%define RADVD_UID 75
Summary: A Router Advertisement daemon Summary: A Router Advertisement daemon
Name: radvd Name: radvd
Version: 1.8.5 Version: 1.8.5
@ -10,10 +9,10 @@ URL: http://www.litech.org/radvd/
Source: %{url}dist/%{name}-%{version}.tar.gz Source: %{url}dist/%{name}-%{version}.tar.gz
Source2: radvd-tmpfs.conf Source2: radvd-tmpfs.conf
Source3: radvd.service Source3: radvd.service
Requires(postun): /usr/sbin/userdel, systemd-units Requires(postun): systemd-units
Requires(preun): systemd-units Requires(preun): systemd-units
Requires(post): systemd-units Requires(post): systemd-units
Requires(pre): /usr/sbin/useradd Requires(pre): shadow-utils
BuildRequires: systemd-units BuildRequires: systemd-units
BuildRequires: flex, flex-static, byacc BuildRequires: flex, flex-static, byacc
@ -80,9 +79,9 @@ if [ "$1" -eq 0 ]; then
fi fi
%pre %pre
getent group radvd >/dev/null || groupadd -g %RADVD_UID -r radvd getent group radvd >/dev/null || groupadd -r radvd
getent passwd radvd >/dev/null || \ getent passwd radvd >/dev/null || \
useradd -r -u %RADVD_UID -g radvd -d / -s /sbin/nologin -c "radvd user" radvd useradd -r -g radvd -d / -s /sbin/nologin -c "radvd user" radvd
exit 0 exit 0
%files %files
@ -101,6 +100,7 @@ exit 0
* Tue Apr 03 2012 Petr Pisar <ppisar@redhat.com> - 1.8.5-2 * Tue Apr 03 2012 Petr Pisar <ppisar@redhat.com> - 1.8.5-2
- Clean up spec file - Clean up spec file
- Remove System V init support - Remove System V init support
- Fix radvd account creation
* Wed Feb 01 2012 Jiri Skala <jskala@redhat.com> - 1.8.5-1 * Wed Feb 01 2012 Jiri Skala <jskala@redhat.com> - 1.8.5-1
- update to latest upstream version 1.8.5 - update to latest upstream version 1.8.5