lkml.org 
[lkml]   [2015]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectFeature request, "create on mount" to create mount point directory on mount, implied remove on unmount
From
Date
Hi, could I make a hugely nieve user request :-) 

Would it be possible to add a new mount option to everything?

New mount option 'com' = "create on mount" (implied remove on unmount).


Example fstab entry
/mounts/amountpoint LABEL=notalwayshere ext4,com


# ls /mounts
# mount /mounts/amountpoint
# ls /mounts
amountpoint
# umount /mounts/amountpoint
# ls /mounts
#


The idea is to create a mount point directory (one level only) if does
not exist when an FS is mounted, umount would remove it when an FS is
unmounted (assuming it was empty) otherwise generate a warning.

As the 'com' flag would need to carried with the mount I assume the
logic would have to be handled in mount() and umount() call itself ?

I can see issues if the mount point directory is read only or similar,
but I am sure most cases could be handled with just a warning.

Many thanks,
Jon




\
 
 \ /
  Last update: 2015-07-03 14:41    [W:0.049 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site