From f1b7b5177f9c90e0260bd318416853c32cf542fb Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Jan 15 2007 17:43:21 +0000 Subject: - rename pcap user to arpwatch --- diff --git a/arpwatch.spec b/arpwatch.spec index f58f229..277bbed 100644 --- a/arpwatch.spec +++ b/arpwatch.spec @@ -1,11 +1,9 @@ %define _vararpwatch %{_localstatedir}/lib/arpwatch -%define PCAP_UID 77 -%define PCAP_GID 77 Name: arpwatch Epoch: 14 Version: 2.1a15 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Network monitoring tools for tracking IP addresses on a network Group: Applications/System License: BSD @@ -94,9 +92,18 @@ rm -rf $RPM_BUILD_ROOT /sbin/chkconfig --add arpwatch %pre -/usr/sbin/groupadd -g %{PCAP_GID} pcap 2> /dev/null -/usr/sbin/useradd -u %{PCAP_UID} -g %{PCAP_GID} \ - -s /sbin/nologin -M -r -d %{_vararpwatch} pcap 2> /dev/null +if ! getent group arpwatch &> /dev/null; then + getent group pcap 2> /dev/null | grep -q 77 && + /usr/sbin/groupmod -n arpwatch pcap 2> /dev/null || + /usr/sbin/groupadd -g 77 arpwatch 2> /dev/null +fi +if ! getent passwd arpwatch &> /dev/null; then + getent passwd pcap 2> /dev/null | grep -q 77 && + /usr/sbin/usermod -l arpwatch -g 77 \ + -d %{_vararpwatch} pcap 2> /dev/null || + /usr/sbin/useradd -u 77 -g 77 -s /sbin/nologin \ + -M -r -d %{_vararpwatch} arpwatch 2> /dev/null +fi : %postun @@ -124,12 +131,15 @@ fi %{_mandir}/man8/arpsnmp.8* %{_initrddir}/arpwatch %config(noreplace) %{_sysconfdir}/sysconfig/arpwatch -%defattr(-,pcap,pcap) +%defattr(-,arpwatch,arpwatch) %dir %{_vararpwatch} %verify(not md5 size mtime) %config(noreplace) %{_vararpwatch}/arp.dat %verify(not md5 size mtime) %config %{_vararpwatch}/ethercodes.dat %changelog +* Mon Jan 15 2007 Miroslav Lichvar 14:2.1a15-3 +- rename pcap user to arpwatch + * Tue Nov 28 2006 Miroslav Lichvar 14:2.1a15-2 - split from tcpdump package (#193657) - update to 2.1a15 diff --git a/arpwatch.sysconfig b/arpwatch.sysconfig index a7399d9..125710d 100644 --- a/arpwatch.sysconfig +++ b/arpwatch.sysconfig @@ -1,4 +1,4 @@ # -u : defines with what user id arpwatch should run # -e : the where to send the reports # -s : the -address -OPTIONS="-u pcap -e root -s 'root (Arpwatch)'" +OPTIONS="-u arpwatch -e root -s 'root (Arpwatch)'"