Bug 194494

Summary: postun code should again move to "post" code?
Product: [Fedora] Fedora Reporter: Florian La Roche <laroche>
Component: sysklogdAssignee: Peter Vrabec <pvrabec>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.4.1-38 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-29 20:42:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Florian La Roche 2006-06-08 15:02:48 UTC
Description of problem: Seems like /var/log/* files are now only
created on postuninstall. Shouldn't this code stay in the post
section of sysklogd?

regards,

Florian La Roche



@@ -58,13 +65,9 @@
 rm -rf $RPM_BUILD_ROOT

 %post
-for n in /var/log/{messages,secure,maillog,spooler}
-do
-       [ -f $n ] && continue
-       touch $n
-       chmod 600 $n
-done
-/sbin/chkconfig --add syslog
+if [ "$1" -eq 1 ]; then
+   /sbin/chkconfig --add syslog
+fi

 %preun
 if [ $1 = 0 ]; then
@@ -74,8 +77,14 @@

 %postun
 if [ "$1" -ge "1" ]; then
-       service syslog condrestart > /dev/null 2>&1
-fi
+   for n in /var/log/{messages,secure,maillog,spooler}
+   do
+       [ -f $n ] && continue
+       touch $n
+       chmod 600 $n
+   done
+   service syslog condrestart > /dev/null 2>&1
+fi

 %triggerpostun -- sysklogd < 1.3.31-17
 /sbin/chkconfig --add syslog



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jason Vas Dias 2006-06-14 21:04:10 UTC
Sorry about that - I thought this was only needed after upgrade - I guess not.
Now fixed with sysklogd-1.4.1-38 .