From owner-freebsd-rc@FreeBSD.ORG Fri Nov 2 14:22:15 2012 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FC95438 for ; Fri, 2 Nov 2012 14:22:15 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 985028FC1B for ; Fri, 2 Nov 2012 14:22:14 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so3329321lag.13 for ; Fri, 02 Nov 2012 07:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=enmUqPcz8OrYy7LUTvDozjyoI309vE42G8FftuIGedI=; b=U+DWI0yX8l0ljoR161fXUYj16Y48EZOkasYYhn20cwqLBMTPjxnFYWngZG339+sAfP uCYvf5z+CbeQxNCZcTw9pdZlE7XKrEFG1hBVLkl83+p/JMX4hHeITznmdFzQZdFu+d0j 8hdSx0NDS8vlwy6ERSUEk1j9TwX5K9kgWwHEE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=enmUqPcz8OrYy7LUTvDozjyoI309vE42G8FftuIGedI=; b=pkxz1SKPZpDpc5MBjoz6+QAIAnojVWUjFHkBkd8T5JkE94tBQSZjpiwsmXdcr+vrv0 QleNB4cFUxi4j5/tk+5dmsJNEOSC+Mu4SwlTy22qjwwkxUG+J+BXXmpMCS54swKBPKAX I8RdxJ2AMSbebdj8vYv1pDRN5iGlcsb7vnrkEnvLwqZDeEY49KLzeMDGHhOVHmhy6Xpj jZhXO3hYH4XRyaz4hKIFntKjDH2zJ36scnHeBBIowzk5s627w4LBEdUjzJxvYTg+KDYF M9CIZYE3s8e1MUcaMlCJo5DMTUTcA0EBWYSYPin3/ZTEY1gCMMPBBmsR3CunUhIJ/+XB m+Xg== Received: by 10.152.104.148 with SMTP id ge20mr1729816lab.51.1351866133432; Fri, 02 Nov 2012 07:22:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.25.166 with HTTP; Fri, 2 Nov 2012 07:21:43 -0700 (PDT) In-Reply-To: References: From: Eitan Adler Date: Fri, 2 Nov 2012 10:21:43 -0400 Message-ID: Subject: Re: mountlate being too mount-happy To: Chris Rees Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmnIGuJAIJBYjBr9nNPVx2AiiSrwIU8HLnH+gCk1h54iHHaCTFhFRVwsImHb8d9LgpZOtnZ Cc: freebsd-rc@freebsd.org, Mateusz Guzik X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 14:22:15 -0000 On 2 November 2012 09:56, Chris Rees wrote: > I'll take a look. untested: diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 1984eac..167c90c 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -245,14 +245,15 @@ main(int argc, char *argv[]) struct fstab *fs; struct statfs *mntbuf; int all, ch, i, init_flags, late, failok, mntsize, rval, have_fstab, ro; + int onlylate; char *cp, *ep, *options; - all = init_flags = late = 0; + all = init_flags = late = onlylate = 0; ro = 0; options = NULL; vfslist = NULL; vfstype = "ufs"; - while ((ch = getopt(argc, argv, "adF:flo:prt:uvw")) != -1) + while ((ch = getopt(argc, argv, "adF:fLlo:prt:uvw")) != -1) switch (ch) { case 'a': all = 1; @@ -269,6 +270,9 @@ main(int argc, char *argv[]) case 'l': late = 1; break; + case 'L': + onlylate = 1; + break; case 'o': if (*optarg) { options = catopt(options, optarg); @@ -329,6 +333,8 @@ main(int argc, char *argv[]) continue; if (hasopt(fs->fs_mntops, "late") && !late) continue; + if (!hasopt(fs->fs_mntops, "late") && onlylate) + continue; if (hasopt(fs->fs_mntops, "failok")) failok = 1; else -- Eitan Adler