[Pkg-sysvinit-devel] Bug#359717: /bin/mountpoint bug: mount -o bind /dir /dir, creates a mountpoint for which /bin/mountpoint is unsuccessful
Zenaan Harkness
zen at freedbms.net
Wed Jul 31 01:13:13 UTC 2013
Sent this in 2010 as email to pkg-sysvinit-devel... :
PS: now I'm on sid, the following was from 2010:
To use 'mount --make-rshared' on say /media or /mnt, requires that
I first run:
mount -o bind /media /media
to create a mountpoint at /media, so that subsequently I can successfully run:
mount --make-rshared /media
This is useful when using chroots, as I do.
I was using "mountpoint -q $DIR" to determine if an arbitrary
directory was mounted or not, in my chroot u/mount script.
Unfortunately this broke when I started using "mount -o bind /media
/media".
So since /bin/mountpoint does not work, I am instead now using:
if mount | grep "on ${DIR} type" > /dev/null; then ...; fi
I just checked initscripts in a Ubuntu 10.04 chroot guest (initscripts
"Version: 2.87dsf-4ubuntu17"),
on my Ubuntu 8.04 host, and /bin/mountpoint there displays the same bug.
My Ubuntu 8.04 uname -a:
Linux ip61 2.6.24-28-generic #1 SMP Sat Oct 16 17:46:03 UTC 2010 i686 GNU/Linux
Initscripts Version: 2.86.ds1-14.1ubuntu45.1
Hope the above is useful,
Zenaan
--
Free Australia: www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.
More information about the Pkg-sysvinit-devel
mailing list