[BusyBox] [patch] new applet mountpoint
Bernhard Fischer
rep.nop at aon.at
Fri Aug 19 08:13:03 UTC 2005
On Thu, Aug 18, 2005 at 07:49:56PM -0400, Mike Frysinger wrote:
>On Thursday 18 August 2005 07:26 pm, Rob Landley wrote:
>> On Thursday 18 August 2005 14:16, Bernhard Fischer wrote:
>> > Hi,
>> >
>> > Attached patch adds a mountpoint(1) applet.
>>
>> I have no strong opinion either way: it looks vaguely sane, and is an
>> applet I've never even heard of (although ubuntu has it).
>>
>> 1) What's the deal with #ifdef __linux__?
sysvinit's mountpoint has that and i felt like keeping that part for the
other OS's just to be safe. I wouldn't object to removing it.
>>
>> 2) Do we really need the full boilerplate telling people that they
>> should use
>> snailmail to get a copy of the GPL, or can't we just give 2 lines ala:
>> This code is licensed under the GPL v2, see the file LICENSE in this
>> tarball
>> or http://fsf.org/copyleft/gpl.html for full license text.
>>
>> 3) Seems fodder for a small shell script. if [`realpath $1` -ne `df . |
>> tail
>> -n 1 | awk '{print $6}'`] gets halfway there already, I'd think...
For the 'mountpoint /dev' case this would do, yes. But for the
-x and -d cases you'd have to also throw stat -c %t:%T and -c %d in
which is a bit cumbersome..
>
>yeah, ive never heard of it either, and the applet looks ok at first glance
fwiw, debian uses it in it's bootup scripts. e.g.:
$ grep mountpoint /etc/init.d/*
/etc/init.d/checkroot.sh: mountpoint -q /dev
/etc/init.d/checkroot.sh: ddev=`mountpoint -qx $rootdev`
/etc/init.d/checkroot.sh: rdev=`mountpoint -d /`
/etc/init.d/checkroot.sh: if [ "`mountpoint -qx
/dev/root`" = "4:0" ]
/etc/init.d/mountvirtfs: if ! mountpoint -q $3
/etc/init.d/nfs-common: if ! mountpoint -q "$2"
/etc/init.d/udev: if mountpoint -q /dev/pts/; then
/etc/init.d/udev: if mountpoint -q /dev/shm/; then
/etc/init.d/udev: if mountpoint -q /dev/; then
/etc/init.d/udev: if mountpoint -q /dev/; then
/etc/init.d/udev-mtab:if mountpoint -q $udev_root; then
/etc/init.d/udev-mtab:# mountpoint(1) does not report bind mounts
More information about the busybox
mailing list