You are not logged in.

#1 2011-03-03 11:00:01

mikeym
Member
Registered: 2009-01-30
Posts: 56

Moving Logs From tmpfs To Disk On Shutdown

Hi, I'm using a Asus eee pc 900 and it only has flash memory so minimal write operations to the card are reomended in the Arch Wiki. They suggest mounting /var/log as tmpfs which is fine and then copying a backup of the logs to and from  tmpfs using a daemon on boot and shutdown. I've tried using an eample daemon that is just a very basic r.d script with start and stop, where start uses mv to move the contents of /backup_logs/ to /var/log and stop moves them back. However I don't know ho to get the shutdown script to work. I tried jut bunging the script in rc.conf as a daemon but I'm not sure this is the best way. Anyway doing that results in an attept to copy hte files to /var/log but not to copy them back to /backup_logs/

Offline

#2 2011-03-03 13:01:11

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Moving Logs From tmpfs To Disk On Shutdown

Look at e.g. the alsa daemon in /etc/rc.d for an example of how to do it.

Offline

Board footer

Powered by FluxBB