[lfs-dev] [lfs-book] r10440 - in trunk/BOOK: . chapter01 chapter06

Bruce Dubbs bruce.dubbs at gmail.com
Thu Jan 16 20:03:43 PST 2014


Moving to -dev.

xinglp wrote:
>> OK, thanks.  Can you test:
>>
>> rm -rf --one-file-system /run/* /tmp/*
>>
> Same error.

For background see
http://www.mail-archive.com/lfs-book@linuxfromscratch.org/msg18517.html

I'm not sure how to handle this.  At the end of Chapter 6 we don't need 
either /dev/shm or /run/shm.

What we do when mounting virtual file systems is:

if [ -h $LFS/dev/shm ]; then
   link=$(readlink $LFS/dev/shm)
   mkdir -pv $LFS/$link
   mount -vt tmpfs shm $LFS/$link
   unset link
else
   mount -vt tmpfs shm $LFS/dev/shm
fi

This means that /run/shm only exists if /dev/shm is a symlink.

We are still in chroot when cleaning up but we can still umount /run/shm 
before deleting.  Probably something like:

[ -e /run/shm ] && umount /run/shm
rm -rf /run/* /tmp/*

Hose does this sound?

   -- Bruce



More information about the lfs-dev mailing list