From: morcego Date: Thu, 7 Mar 2002 05:06:54 +0000 (+0000) Subject: Fixed %pre scriptlet. And, as a bonus, you can even understand it now. :-) X-Git-Tag: v_2_9_12~130 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=ba98a11bd171d313ee942191dd9c4e8e5737e2da Fixed %pre scriptlet. And, as a bonus, you can even understand it now. :-) --- diff --git a/junkbuster-rh.spec b/junkbuster-rh.spec index f6cd4c0f..f6bad5a4 100644 --- a/junkbuster-rh.spec +++ b/junkbuster-rh.spec @@ -242,7 +242,15 @@ perl -pe 's/{-no-cookies}/{-no-cookies}\n\.redhat.com/' ijb.action >\ # If we don't, we check to see if the user junkbust exist and, in case it # does, we change it do junkbuster. If it also does not exist, we create the # junkbuster user -- morcego -id junkbuster > /dev/null 2>&1 || ( id junkbust && /usr/sbin/usermod -l junkbuster junkbust ) || ( /usr/sbin/useradd -d /etc/%{name} -r %{name} -s "" > /dev/null 2>&1 || /bin/true ) +id junkbuster > /dev/null 2>&1 +if [ $? -eq 1 ]; then + id junkbust > /dev/null 2>&1 + if [ $? -eq 0 ]; then + /usr/sbin/usermod -l junkbuster -d %{_sysconfdir}/%{name} -s "" junkbust > /dev/null 2>&1 + else + /usr/sbin/useradd -d %{_sysconfdir}/%{name} -r -s "" junkbuster > /dev/null 2>&1 + fi +fi %post # for upgrade from 2.0.x @@ -279,7 +287,7 @@ fi %doc doc/text/developer-manual.txt doc/text/user-manual.txt %doc doc/webserver/developer-manual %doc doc/webserver/user-manual -#%%doc %{name}.weekly %{name}.monthly AUTHORS +#%doc %{name}.weekly %{name}.monthly AUTHORS %dir %{ijbconf} %dir %{ijbconf}/templates