[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: a place for a package directory in root



In article <20050902065319.GA4954@chistera.yi.org>,
Adeodato Simó  <asp16@alu.ua.es> wrote:
>* Steve Langasek [Thu, 01 Sep 2005 23:03:21 -0700]:
>
>> Hrm.  If this information is all just being copied to the real
>> filesystem at the end of the boot process anyway, why does it need to
>> write it out to disk instead of just storing it in memory, anyway?
>
>  He claimed it's not possible:
>  
>    http://lists.debian.org/debian-devel/2005/08/msg01673.html

Actually, it's pretty simple to do this, by using a lazy unmount.
No need to add an extra /run directory.

#! /bin/sh

cd /
mount -n -t tmpfs tmpfs /tmp
cd /tmp
umount -n -fl /tmp

# From this point on, the current working directory of this script
# and all its children is a tmpfs mount that isn't seen by the
# rest of the system. As soon as this script exits the tmpfs
# mount is cleaned up.

... bla, blah ...

Mike.



Reply to: