Page comments https://www.nohl.eu/home/ https://www.nohl.eu/tech-resources/notes-to-linux/log-files-in-tmpfs-without-breaking-logging/#PageComment_14 This seems to be all they have left to work with, which has some people panicking Fri, 07 Dec 2012 14:55:49 +0100 replica watches https://www.nohl.eu/tech-resources/notes-to-linux/log-files-in-tmpfs-without-breaking-logging/#PageComment_14 https://www.nohl.eu/tech-resources/notes-to-linux/log-files-in-tmpfs-without-breaking-logging/#PageComment_10 Hi,
I adapted the script for debian:
-->START SCRIPT<--
#! /bin/sh
### BEGIN INIT INFO
# Provides: boot.localfs-tmp
# Required-Start: $remote_fs $time
# Required-Stop: umountnfs $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: create log file system in tmpfs
# Description: some services need a given file skel in /var/log - create it
### END INIT INFO
#
# Author: http://www.nohl.eu/tech-resources/notes-to-linux/log-files-in-tmpfs-without-breaking-logging/ adapted for Debian by Pietro <pc@localhost>
#

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="create log file system in tmpfs"
NAME=boot.localfs-tmp

SCRIPTNAME=/etc/init.d/$NAME

case "$1" in
# create skeleton of /var/log at /etc/log-skel.tgz
create)
for file in `/usr/bin/find /var/log -type f`; do
> "$file";
done
files=`/usr/bin/find /var/log`;
/bin/tar czf /etc/log-skel.tgz /var/log --absolute-names;
/bin/chown root.root /etc/log-skel.tgz;
/bin/chmod 500 /etc/log-skel.tgz;
echo "created /etc/log-skel.tgz";
;;
# when started uncompress skel into tmpfs at /var/log
start)
/bin/tar xzf /etc/log-skel.tgz --keep-old-files --absolute-names;
echo -n "create log skeleton in tmpfs"
;;
# dummy stop section
stop)
echo -n "ha ha, brainless tmpfs";
;;
# usage:
*)
echo "Usage: $0 {start|create}";
exit 1
;;
esac
-->END SCRIPT<--

and after:
sudo update-rc.d boot.localfs-tmp start 01 2 3 4 5 .
Tue, 12 Jun 2012 17:33:48 +0200 pietro https://www.nohl.eu/tech-resources/notes-to-linux/log-files-in-tmpfs-without-breaking-logging/#PageComment_10