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

Re: what is /.udev for ?

GOMBAS Gabor wrote:
> ... which would mean that it would become unaccessible (and thus
> meaningless) as the real /var gets mounted later in the boot process.
> You cannot reliably put it under a directory that is not guaranteed to
> be on the root file system; that leaves roughly /, /etc, /bin, /lib and
> /sbin. Pick your favourite :-)
What about this:

TMPDEV="`mktemp -d /tmp/devXXXXXX || { mkdir /.dev; echo -n /.dev; }`"
mount -o bind /dev $TMPDEV
mount -t tmpfs none /dev
mkdir /dev/orig
mount -o bind $TMPDEV /dev/orig
umount $TMPDEV
rm -rf $TMPDEV

This way there's no clutter in / and the original dev is mounted in a valid
place that won't get overmounted later. It's also fhs compliant I think.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: