BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 29th, 2005, 12:37 PM
PhackedUp PhackedUp is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 146 PhackedUp User rank is Corporal (100 - 500 Reputation Level)PhackedUp User rank is Corporal (100 - 500 Reputation Level)PhackedUp User rank is Corporal (100 - 500 Reputation Level)PhackedUp User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 22 h 17 m 52 sec
Reputation Power: 4
Send a message via AIM to PhackedUp Send a message via MSN to PhackedUp
Log Rotation Problem (FreeBSD 5.4)

My logrotate is not recreating the original log file even though I have that set as the default.

Here is the config file:
maillast
mail root
nomissingok
ifempty
nodelaycompress
compress
rotate 10
weekly

include /usr/local/etc/logrotate.d

/var/log/wtmp {
monthly
}




When I force rotation the wtmp file (viewable via last) is replaced with wtmp.1.bz2. That part is good.

What's not good is that the wtmp file is not recreated which means "last" does not work properly thereafter.

I suppose as a post rotate command I can touch the.log but i would have to do that for each rotation entry which is a pain in the arse.

Does anyone have a solution or any ideas?

Does anyone know if there is a variable i can pass to the post rotate command (for instance: touch $this_file) that i can use as a global default which will recreate the appropriate log file for each rotation?

Reply With Quote
  #2  
Old November 29th, 2005, 01:22 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Add "create" to your default options.

M.
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Log Rotation Problem (FreeBSD 5.4)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway