Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754536AbbGCMP6 (ORCPT ); Fri, 3 Jul 2015 08:15:58 -0400 Received: from jonshouse.plus.com ([81.174.134.161]:44400 "EHLO mail.jonshouse.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754878AbbGCMPu (ORCPT ); Fri, 3 Jul 2015 08:15:50 -0400 X-Greylist: delayed 821 seconds by postgrey-1.27 at vger.kernel.org; Fri, 03 Jul 2015 08:15:50 EDT Subject: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount From: jon Reply-To: jon@jonshouse.co.uk To: coreutils@gnu.org Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Date: Fri, 03 Jul 2015 13:01:59 +0100 Message-ID: <1435924919.6501.432.camel@jonspc> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1115 Lines: 39 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/