diff --git a/vnstat.spec b/vnstat.spec index 165776f..b0f1b96 100644 --- a/vnstat.spec +++ b/vnstat.spec @@ -1,23 +1,26 @@ Summary: Console-based network traffic monitor Name: vnstat Version: 1.4 -Release: 8%{?dist} +Release: 9%{?dist} License: GPL Group: System Environment/Daemons URL: http://humdi.net/vnstat/ Source0: http://humdi.net/vnstat/vnstat-%{version}.tar.gz Source1: FAQ.vnstat +Requires(pre): /usr/sbin/useradd BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description -vnStat is a console-based network traffic monitor that uses the -/proc -filesystem to get the needed information. This means that vnStat wont -actually be sniffing any traffic. See the webpage for few 'screenshots'. +vnStat is a console-based network traffic monitor that keeps a log of daily +network traffic for the selected interface(s). vnStat isn't a packet sniffer. +The traffic information is analyzed from the /proc-filesystem, so vnStat can +be used without root permissions. See the webpage for few 'screenshots'. %prep %setup -q %{__cp} %{SOURCE1} FAQ +%{__sed} -i 's/ifconfig/ip addr show/' src/vnstat.c %build %{__make} %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" @@ -36,7 +39,7 @@ actually be sniffing any traffic. See the webpage for few 'screenshots'. %{__cat} >> $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name} << END MAILTO=root -# to enable intrerface monitoring via vnstat remove comment on next line +# to enable interface monitoring via vnstat remove comment on next line # */5 * * * * vnstat %{_sbindir}/%{name}.cron END @@ -69,12 +72,8 @@ END %{__rm} -rf $RPM_BUILD_ROOT %pre -useradd -r -s /sbin/nologin -d %{_localstatedir}/lib/%{name} -c 'vnstat user' %{name} >/dev/null 2>&1 ||: - -%preun -if [ "$1" -eq "0" ]; then - userdel %{name} -fi +%{_sbindir}/useradd -r -s /sbin/nologin -d %{_localstatedir}/lib/%{name} \ + -M -c "vnStat user" %{name} > /dev/null 2>&1 || : %files %defattr(-,root,root,-) @@ -87,6 +86,9 @@ fi %attr(-,vnstat,vnstat)%{_localstatedir}/lib/%{name} %changelog +* Mon Feb 26 2007 Adrian Reber - 1.4-9 +- applied patch for spec file cleanup (#229037) + * Fri Sep 15 2006 Adrian Reber - 1.4-8 - rebuilt