Directory disappears after reboot. (Draper Drake)

Alan McKinnon alan at
Sun Mar 5 20:24:54 UTC 2006

On Sunday, 5 March 2006 17:35, Derek Broughton wrote:
> Holger (Admin) wrote:
> > Hi,
> > I have installed the package tor and after the installation the
> > application started.
> > After a reboot the application no more started. So I tried to
> > start the script in the
> >
> > init.d directory and the output complained about a directory 
> >>./tor start
> >
> > There is no /var/run/tor directory.
> >
> > Therefore I created it and then the application once again
> > started successful. After
> > a reboot then the directory under /var/run was gone. So the
> > application failed on
> > on the load. My question is why this manual created directory
> > under /var/run always
> > get lost after the reboot ? What do i need to do that it stays ?
> /var/run is _always_ cleared on boot.  So anything that needs a
> directory to persist across boots should never use /var/run.

That's then a bug and should be reported. There's no valid reason for 
the init scripts to delete _everything_ in /var/run, only the files 
need to be cleared - this is where .pid files and lock files tend to 
go. Meanwhile, as a workaround, rename the tor binary to tor-bin and 
create a script called tor in the same directory owned by root. It 
should check for the existence of the directory and create it if 
needed, then run tor-bin

It's a bit of a hack and will get obliterated with the next upgrade, 
but it's easier than fiddling with the init scripts
Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five

More information about the ubuntu-users mailing list