From owner-svn-src-all@FreeBSD.ORG Mon Jul 11 01:38:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C509F106566C; Mon, 11 Jul 2011 01:38:17 +0000 (UTC) (envelope-from inyaoo@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 643A98FC0A; Mon, 11 Jul 2011 01:38:17 +0000 (UTC) Received: by iyb11 with SMTP id 11so4191771iyb.13 for ; Sun, 10 Jul 2011 18:38:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=pr1EREYclLFtDXkzndXNFB+RhHrz4YXqvkLhstuqeOk=; b=hsc7Ui2SxFsxnilYjNRQDEXfnzLiwqci26geBcVPFStyEJxuJwQ3Q7k/AjQQ8oKfrS Qylq+oZFfoChxdfye0fZ20Y9t+tVYRUG1LhvSaUZ9IY8greSZtveeaemrwpwzjvHBkak p2sTONS1qadNEZ6HUNXNo+y9s0JhPNQADEL14= Received: by 10.231.24.193 with SMTP id w1mr4073639ibb.41.1310348296409; Sun, 10 Jul 2011 18:38:16 -0700 (PDT) Received: from localhost (tor-exit-router41-readme.formlessnetworking.net [199.48.147.41]) by mx.google.com with ESMTPS id e23sm7440944ibe.6.2011.07.10.18.38.14 (version=SSLv3 cipher=OTHER); Sun, 10 Jul 2011 18:38:15 -0700 (PDT) From: Pan Tsu To: Doug Barton References: <201107102347.p6ANl3qK066321__21248.7196004533$1310341655$gmane$org@svn.freebsd.org> <86ipr9sl4j.fsf@gmail.com> <4E1A498B.9080506@FreeBSD.org> Date: Mon, 11 Jul 2011 05:38:11 +0400 In-Reply-To: <4E1A498B.9080506@FreeBSD.org> (Doug Barton's message of "Sun, 10 Jul 2011 17:53:31 -0700") Message-ID: <86vcv97g1o.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r223917 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 11 Jul 2011 01:38:17 -0000 Doug Barton writes: > On 07/10/2011 17:42, Pan Tsu wrote: >> Doug Barton writes: >> >>> Author: dougb >>> Date: Sun Jul 10 23:47:03 2011 >>> New Revision: 223917 >>> URL: http://svn.freebsd.org/changeset/base/223917 >>> >>> Log: >>> Make sure we load kernel modules from the same path as the running kernel >>> >>> Modified: >>> head/etc/rc.d/kld >>> >>> Modified: head/etc/rc.d/kld >>> ============================================================================== >>> --- head/etc/rc.d/kld Sun Jul 10 22:09:53 2011 (r223916) >>> +++ head/etc/rc.d/kld Sun Jul 10 23:47:03 2011 (r223917) >>> @@ -41,11 +41,24 @@ kld_start() >>> { >>> [ -n "$kld_list" ] || return >>> >>> - local _kld >>> + local _kernel_path _module_path _kld _path >>> + >>> + _kernel_path=`$SYSCTL_N kern.bootfile` >>> + _kernel_path="${_kernel_path%/*}" >>> + >>> + _module_path=`$SYSCTL_N kern.module_path` >>> + _module_path="${_module_path#*\;}" >>> + _module_path="$_kernel_path `ltr $_module_path \; ' '`" >> [...] >> >> Doesn't /boot/support.4th already populates kern.module_path with >> the path of successfully booted kernel? How is this different? > > When you test it, what happens? /boot/foo is replaced by /boot/foo. But ignore my noise, I didn't test with other loaders, loading manually and booting from boot2.