From owner-svn-src-all@freebsd.org Sat Feb 17 14:51:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C2F6F150E0 for ; Sat, 17 Feb 2018 14:51:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AB8482889 for ; Sat, 17 Feb 2018 14:51:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22b.google.com with SMTP id q4so118832itc.0 for ; Sat, 17 Feb 2018 06:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cwaRtWSoAVVjPN0apSZw3BueDlMQEhsHkdGk2mtQXL8=; b=Z1NdCGZ+bum2Tv/ny3P6IpOU2dy359KAmhvrhGGvxJ4OXlgp+CZw93UhPxJZLd58dT qTDoHBn2lIyWxGGYCAIpOkKUdZJCmQBEsU/tzE3WhpBr5U6mv9P65aku304IkhbQHg5C udjJtE5fCGIZv70XKsN2b8nGHAestDJjM8UAM1Joyxl47f2Rx8uH/zRzdwegWKSxz3Il KYR2ogWAbp1fYPLnjiiwJajPlz0XBU8O21jNMqaYrwR7KOAMaib62HQzpIJs4m4kgzj0 95ZSJAZ6EBG3m/a95Nfgh6gFhGV2ASQkHXFy7pQk1GbIz5UnVN5eBjLRgtAjT9lumLXS ZZmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cwaRtWSoAVVjPN0apSZw3BueDlMQEhsHkdGk2mtQXL8=; b=CUsly/GOc2hSLc1He1PuvKX1+M3TrBXyq2Fp4G3xXpfCsX4CTAzn2FgW2xw3b6Oifi m8VmYWT6XCeVJSPU/M9sOq3UIgScpY5qkN/EZBDKfygmYeNMPDnLbuI8efty36HXtDlc g7E1iMxVjn+zXGp/OzSvE86aJbn+df6ZsOanv9ZO7QSEMcsUXVRGwDdOJR9wA/7PGaLa +V0cI9Dledt/VStDACptUVRE84tUgMu3ZokW3UMKHbnRvryUl/cFd5DczPcgwGcBgGug XSNchcyW4kfn0raq4w8SSO7EZVsUAc2KxFqSbsOhS0cM6mdxb/dMs0LIuOXnORZ64zkF RXeQ== X-Gm-Message-State: APf1xPAXFzwgLb6xQPkewNn4bT5KYF919wYd1rPBIt4IXMT0K15wEpK+ FN+s0yVmujsqakg9d/AJQXeOyGlFW5X7n4J6oKD6YQ== X-Google-Smtp-Source: AH8x224SCPu2/P0kYL8K0Hm3jiwbDpefXF0XInIGYiiNU2v40q4GMP6yeT2+wC+21oPBSqDdtIamD5G5oYFNzZqCl54= X-Received: by 10.36.55.146 with SMTP id r140mr2041246itr.57.1518879078348; Sat, 17 Feb 2018 06:51:18 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.201.67 with HTTP; Sat, 17 Feb 2018 06:51:17 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <201802171332.w1HDWTBr032549@repo.freebsd.org> References: <201802171332.w1HDWTBr032549@repo.freebsd.org> From: Warner Losh Date: Sat, 17 Feb 2018 07:51:17 -0700 X-Google-Sender-Auth: VQZyN5U8XCZvczbpnUcAcee1FAw Message-ID: Subject: Re: svn commit: r329456 - head/etc/rc.d To: Hans Petter Selasky Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Feb 2018 14:51:19 -0000 On Sat, Feb 17, 2018 at 6:32 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Sat Feb 17 13:32:29 2018 > New Revision: 329456 > URL: https://svnweb.freebsd.org/changeset/base/329456 > > Log: > Fix handling of "one_nomatch" shell variable to preserve its contents > appearing as a single argument passed to devmatch(8). > > Don't depend on "sort" utility from usr/bin which might not be > available when devd is started. > It's more the unique part than the sort part since otherwise we try to load things a large number of times. I'd preferred if you'd talked to me about a non-urgent change like this (split / and /usr is broken already and there's a few other places that are also a problem) Warner > Sponsored by: Mellanox Technologies > > Modified: > head/etc/rc.d/devmatch > > Modified: head/etc/rc.d/devmatch > ============================================================ > ================== > --- head/etc/rc.d/devmatch Sat Feb 17 13:13:55 2018 (r329455) > +++ head/etc/rc.d/devmatch Sat Feb 17 13:32:29 2018 (r329456) > @@ -37,13 +37,17 @@ desc="Use devmatch(8) to load kernel modules" > > start_cmd="${name}_start" > stop_cmd=':' > -[ -n "$2" ] && one_nomatch="-p '$2'" > +one_nomatch="$2" > > devmatch_start() > { > local x > > - x=$(devmatch ${one_nomatch} | sort -u) > + if [ -n "$one_nomatch" ]; then > + x=$(devmatch -p "${one_nomatch}") > + else > + x=$(devmatch) > + fi > > [ -n "$x" ] || return > > @@ -53,8 +57,8 @@ devmatch_start() > # We also optimize against the false positives > # or drivers that have symbolic links that > # confuse devmatch by running it -n. > - echo "Autoloading modules: ${x}" > for m in ${x}; do > + echo "Autoloading module: ${m}" > kldload -n ${m} > done > } > >