]> git.pld-linux.org Git - packages/inn.git/commitdiff
- concise %post
authorTomasz Pala <gotar@pld-linux.org>
Thu, 12 Feb 2009 14:07:20 +0000 (14:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    inn.spec -> 1.184

inn.spec

index b5d75c7639c84411806a9ea5d7ce0e3e87d68d4a..2038088390b98d1a96abc656dd858158f1d30386 100644 (file)
--- a/inn.spec
+++ b/inn.spec
@@ -358,34 +358,29 @@ rm -rf $RPM_BUILD_ROOT
 if [ "`getent passwd news | cut -d: -f6`" = "/var/spool/news" ]; then
        /usr/sbin/usermod -d /home/services/news news
 fi
+
 umask 022
-if [ -f /var/lib/news/history ]; then
-       cd /var/lib/news
-       %{_bindir}/makedbz -s `wc -l <history` -f history
-       for i in dir hash index pag; do
-               [ -f history.n.$i ] && mv history.n.$i history.$i
-       done
-       chown news:news history.*
-       chmod 644 history.*
-else
-       cd /var/lib/news
+cd /var/lib/news
+if [ ! -f /var/lib/news/history ]; then
        # makehistory fails on uninitialized spool(?) - create empty history in such case
-       %{_bindir}/makehistory || ( echo "Creating empty history instead." ; touch history )
-       %{_bindir}/makedbz -s `wc -l <history` -f history
-       for i in dir hash index pag; do
-               [ -f history.n.$i ] && mv history.n.$i history.$i
-       done
-       chown news:news history history.*
-       chmod 644 history history.*
+       %{_bindir}/makehistory || { echo "Creating empty history"; :> history; }
+       chown news:news history
+       chmod 644 history
 fi
+%{_bindir}/makedbz -s `wc -l history` -f history
+for i in dir hash index pag; do
+       [ -f history.n.$i ] && mv history.n.$i history.$i
+done
+chown news:news history.*
+chmod 644 history.*
 
 if [ ! -f /var/lib/news/active.times ]; then
-       touch /var/lib/news/active.times
+       :> /var/lib/news/active.times
        chown news:news /var/lib/news/active.times
 fi
 
 if [ ! -f /var/lib/news/.news.daily ]; then
-       touch /var/lib/news/.news.daily
+       :> /var/lib/news/.news.daily
        chown news:news /var/lib/news/.news.daily
        chmod 664 /var/lib/news/.news.daily
 fi
This page took 0.046538 seconds and 4 git commands to generate.