[SOLVED] Creating directories early in boot process

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

[SOLVED] Creating directories early in boot process

Postby excruciated on Thu Nov 22, 2012 9:59 pm

Hello. I have never worked with Upstart and do not have time to read the entire cookbook right now. I am using Mint 13.

The Background:
In order to reduce writes to a solid state drive, I have /tmp mounted as tmpfs in fstab. Other directories that have a good amount of writes and contain files that I do not mind losing between boots are moved or symlinked to /tmp. I am trying to keep /tmp organized and wish to create a directory tree during boot so each symlinked directory gets its own directory in /tmp.

The Problem:
One of the symlinked directories is /var/log, which I wish to symlink to /tmp/log. This requires creating /tmp/log before logs are written else certain processes will not function properly or choose to write their logs elsewhere. It would be easy to create a new job for this in /etc/init, but by default this would not be executed early enough.

What is the best method for automatically executing a series of commands as early as possible in the boot process? I have accomplished a similar task using much simpler BSD-style init scripts in the past, so I am assuming it can be done with Upstart. Any solution (or a link to the solution) would be greatly appreciated.
excruciated
Level 1
Level 1
 
Posts: 4
Joined: Sun Oct 21, 2012 8:05 pm

Linux Mint is funded by ads and donations.
 

Re: [SOLVED] Creating directories early in boot process

Postby excruciated on Sat Nov 24, 2012 5:10 pm

Solved; added to the script in /etc/init/rc-sysinit.conf before the system initialization scripts are called.
excruciated
Level 1
Level 1
 
Posts: 4
Joined: Sun Oct 21, 2012 8:05 pm


Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 16 guests