From owner-freebsd-rc@FreeBSD.ORG Sun Nov 14 08:09:35 2010 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E174106564A; Sun, 14 Nov 2010 08:09:35 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 719258FC08; Sun, 14 Nov 2010 08:09:33 +0000 (UTC) Received: by wyb36 with SMTP id 36so1475386wyb.13 for ; Sun, 14 Nov 2010 00:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=k/PV3WfM/j7l/CUZcaY+NPWdw97CrLfBxgPu4fo9hzs=; b=iRkDD8D//hHHgQ16Fk/vrZez4fmRVu2AHOGfWz9pgQKIxAbxEqedVH47+evDRVRH5R JWEApT3ulwYlyW+mOMydBiLX1T5zvXdekBP3VQ9N4pAh/lVzAxES8RSpHgckP/JE39h/ 4TPLU381A/RyylKaujUs18bklgLuyQZ5Bm1fU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=PwAz4+QOc7EdwjDlVz/HvKUkVpT8LAbH0MeC5zsWebOFwTIxjeYL40TCRgq0tjz6Da qY5Z96nRIfyKmXwPFaF6K9lGAf5Q0ZScuXYrqisAMgg/3Y+KAS4zcqICR/zZub2+oiYp EnNlm+lUfmEt88rJg7d3vd3px/RAKmj3nTbas= MIME-Version: 1.0 Received: by 10.216.46.200 with SMTP id r50mr5835278web.45.1289722173109; Sun, 14 Nov 2010 00:09:33 -0800 (PST) Received: by 10.216.198.27 with HTTP; Sun, 14 Nov 2010 00:09:33 -0800 (PST) Date: Sun, 14 Nov 2010 00:09:33 -0800 Message-ID: From: Garrett Cooper To: rc@freebsd.org Content-Type: multipart/mixed; boundary=0016364c7a13fcb9b30494fed700 Cc: Doug Barton Subject: [PATCH] Minor mdconfig rc.d script tweaks and documentation improvements X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 14 Nov 2010 08:09:35 -0000 --0016364c7a13fcb9b30494fed700 Content-Type: text/plain; charset=ISO-8859-1 Hi RC folks, The following request resolves 2 PRs in the database which ask that the mdconfig rc.d process be made more straightforward. If someone could review and commit this change (if they don't object with it), I would appreciate it (as well as the submitters I'm sure). Thanks! -Garrett Add the ability to specify md(4) units when running the mdconfig rc scripts and better document the overall process. This allows folks to preconfigure units using a supported method that aren't md0 and up, in the event that build infrastructure, etc can't be easily changed to deal with device name collisions. The enumeration process itself wasn't fully documented, so better document what occurs when the script is executed. PR: conf/137470, docs/144537 --0016364c7a13fcb9b30494fed700 Content-Type: text/x-patch; charset=US-ASCII; name="mdconfig-units-functionality-and-doc-improvements.patch" Content-Disposition: attachment; filename="mdconfig-units-functionality-and-doc-improvements.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gghn06va0 SW5kZXg6IGV0Yy9yYy5kL21kY29uZmlnCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGV0Yy9yYy5kL21kY29uZmln CShyZXZpc2lvbiAyMTQ5MDcpCisrKyBldGMvcmMuZC9tZGNvbmZpZwkod29ya2luZyBjb3B5KQpA QCAtMTc0LDYgKzE3NCw3IEBACiB9CiAKIF9tZGNvbmZpZ19jbWQ9IiQxIgorX21kY29uZmlnX2xp c3Q9JG1kY29uZmlnX3VuaXRzCiBpZiBbICQjIC1ndCAwIF07IHRoZW4KICAgICAgICAgc2hpZnQK IGZpCkluZGV4OiBldGMvcmMuZC9tZGNvbmZpZzIKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gZXRjL3JjLmQvbWRj b25maWcyCShyZXZpc2lvbiAyMTQ5MDcpCisrKyBldGMvcmMuZC9tZGNvbmZpZzIJKHdvcmtpbmcg Y29weSkKQEAgLTIwNCw2ICsyMDQsNyBAQAogfQogCiBfbWRjb25maWcyX2NtZD0iJDEiCitfbWRj b25maWcyX2xpc3Q9JG1kY29uZmlnX3VuaXRzCiBpZiBbICQjIC1ndCAwIF07IHRoZW4KICAgICAg ICAgc2hpZnQKIGZpCkluZGV4OiBzaGFyZS9tYW4vbWFuNS9yYy5jb25mLjUKPT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQot LS0gc2hhcmUvbWFuL21hbjUvcmMuY29uZi41CShyZXZpc2lvbiAyMTQ5MDcpCisrKyBzaGFyZS9t YW4vbWFuNS9yYy5jb25mLjUJKHdvcmtpbmcgY29weSkKQEAgLTM5OTcsNiArMzk5NywxOCBAQAog d2hpY2ggY2F1c2VzIGxvZyBmaWxlcyBmbGFnZ2VkIHdpdGggYQogLkNtIEMKIHRvIGJlIGNyZWF0 ZWQuCisuSXQgVmEgbWRjb25maWdfdW5pdHMKKy5QcSBWdCBzdHIKK0EgbGlzdCBvZiBvbmUgb3Ig bW9yZQorLlhyIG1kIDQKK3VuaXRzIHRvIGNvbmZpZ3VyZSB3aXRoCisuWHIgbWRjb25maWcgOAor YW5kCisuWHIgbmV3ZnMgOCAuCitJZiB1bnNwZWNpZmllZCwgdGhlCisuVmEgbWRjb25maWdfbWQg TnMgQXEgQXIgWAordmFyaWFibGVzIGFyZSBldmFsdWF0ZWQgaW4gY29uc2VjdXRpdmUgb3JkZXIg ZnJvbSBtZDAsIHVudGlsIG9uZSB2YXJpYWJsZSBpcwordW5zZXQgb3IgbnVsbCAoc2VlIGJlbG93 KS4KIC5JdCBWYSBtZGNvbmZpZ19tZCBOcyBBcSBBciBYCiAuUHEgVnQgc3RyCiBBcmd1bWVudHMg dG8KQEAgLTQwMTUsMTAgKzQwMjcsMTAgQEAKIC5GbCBmIEFyIGZpbGUKIGZvciB2bm9kZSBiYWNr ZWQKIC5YciBtZCA0Ci1kZXZpY2VzLgotTm90ZSB0aGF0Ci0uVmEgbWRjb25maWdfbWQgTnMgQXEg QXIgWAotdmFyaWFibGVzIGFyZSBldmFsdWF0ZWQgdW50aWwgb25lIHZhcmlhYmxlIGlzIHVuc2V0 IG9yIG51bGwuCitkZXZpY2VzLiBFYWNoCisuWHIgbWQgNAorZGV2aWNlIHRvIGJlIGNvbmZpZ3Vy ZWQgbXVzdCBiZSBkZWZpbmVkIGluCisuWHIgZnN0YWIgNSAuCiAuSXQgVmEgbWRjb25maWdfbWQg TnMgQW8gQXIgWCBBYyBOcyBWYSBfbmV3ZnMKIC5QcSBWdCBzdHIKIE9wdGlvbmFsIGFyZ3VtZW50 cyBwYXNzZWQgdG8K --0016364c7a13fcb9b30494fed700-- From owner-freebsd-rc@FreeBSD.ORG Sun Nov 14 20:54:48 2010 Return-Path: Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D22DF1065673; Sun, 14 Nov 2010 20:54:48 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A8C588FC12; Sun, 14 Nov 2010 20:54:48 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oAEKsmUa066096; Sun, 14 Nov 2010 20:54:48 GMT (envelope-from brucec@freefall.freebsd.org) Received: (from brucec@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oAEKsmY6066092; Sun, 14 Nov 2010 20:54:48 GMT (envelope-from brucec) Date: Sun, 14 Nov 2010 20:54:48 GMT Message-Id: <201011142054.oAEKsmY6066092@freefall.freebsd.org> To: am@raisa.eu.org, brucec@FreeBSD.org, freebsd-rc@FreeBSD.org From: brucec@FreeBSD.org Cc: Subject: Re: conf/148961: [PATCH] netstart and network_ipv6 contains references to nonexistent files X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 14 Nov 2010 20:54:48 -0000 Synopsis: [PATCH] netstart and network_ipv6 contains references to nonexistent files State-Changed-From-To: open->closed State-Changed-By: brucec State-Changed-When: Sun Nov 14 20:53:48 UTC 2010 State-Changed-Why: Fixed in r212140 and r211074. http://www.freebsd.org/cgi/query-pr.cgi?pr=148961 From owner-freebsd-rc@FreeBSD.ORG Mon Nov 15 06:38:03 2010 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A12E1065673 for ; Mon, 15 Nov 2010 06:38:03 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id B184C8FC14 for ; Mon, 15 Nov 2010 06:38:02 +0000 (UTC) Received: by wwi14 with SMTP id 14so615230wwi.31 for ; Sun, 14 Nov 2010 22:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=GLLoYhXXKjPciir2QaIauNp+OomYuQd7tVqp8nVWgvo=; b=YpY1VVRdxmNPDkTZzIOB3QQfoF2MwE0gFwXa45hhXniA0Fvmbv1gPIrMXdydSg4gj+ a0J8JNlI20FxoV9KkYXJzAP6BBmFznDeo49WEcHWJfoJrCk4Vpgqrfbqs2qi3bpd21Q9 bxiQZIYz4KRpgDo8xE6Says7PbX2UY2s3pamc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=bSHVflF3gLR0sG8SyIPGVKUNXjuXhpIsNxogq11J6hJMyO3HWVY+F688E0V3RGVFQf PbdK4riZmpprX5q2gruOsELe4cRFU5A6c0dmmvMGJY0BMQHMDn1bS16aHbgIO1OAJdhM F2bBDiflLjd2/HJsrshgLEXFcyXfS3x2pDnpQ= MIME-Version: 1.0 Received: by 10.216.82.197 with SMTP id o47mr5421433wee.45.1289803081543; Sun, 14 Nov 2010 22:38:01 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Sun, 14 Nov 2010 22:38:01 -0800 (PST) Date: Sun, 14 Nov 2010 22:38:01 -0800 X-Google-Sender-Auth: AiXGZm22SLRyxJDY8k63NGYbh6E Message-ID: From: Garrett Cooper To: rc@freebsd.org Content-Type: multipart/mixed; boundary=001636eefd2a81717e049511ae0d Cc: Subject: [PATCH] add guard for checking _file in etc/rc.d/mdconfig2 X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 15 Nov 2010 06:38:03 -0000 --001636eefd2a81717e049511ae0d Content-Type: text/plain; charset=ISO-8859-1 The mdconfig2 script doesn't have a ${type} = vnode guard for checking whether or not ${_file} is readable. The attached patch fixes that. If someone could review and commit this change it would be much appreciated. Thanks! -Garrett --001636eefd2a81717e049511ae0d Content-Type: text/x-patch; charset=US-ASCII; name="etc-rc.d-mdconfig2-add-_file-guard.patch" Content-Disposition: attachment; filename="etc-rc.d-mdconfig2-add-_file-guard.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ggiz9zl20 SW5kZXg6IGV0Yy9yYy5kL21kY29uZmlnMgo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBldGMvcmMuZC9tZGNvbmZp ZzIJKHJldmlzaW9uIDIxNTMzMykKKysrIGV0Yy9yYy5kL21kY29uZmlnMgkod29ya2luZyBjb3B5 KQpAQCAtMTEzLDkgKzExMywxMSBAQAogCiAJZm9yIF9tZCBpbiAke19tZGNvbmZpZzJfbGlzdH07 IGRvCiAJCWluaXRfdmFyaWFibGVzICR7X21kfQotCQlpZiBbICEgLXIgJHtfZmlsZX0gXTsgdGhl bgotCQkJZXJyIDMgIiR7X2ZpbGV9IGRvZXNuJ3QgZXhpc3QiCi0JCQljb250aW51ZQorCQlpZiBb ICIke3R5cGV9IiA9ICJ2bm9kZSIgXTsgdGhlbgorCQkJaWYgWyAhIC1yICIke19maWxlfSIgXTsg dGhlbgorCQkJCWVyciAzICIke19maWxlfSBkb2Vzbid0IGV4aXN0IgorCQkJCWNvbnRpbnVlCisJ CQlmaQogCQlmaQogCQkjIEZpcnN0IHBhc3M6IGNyZWF0ZSBtZCg0KSB2bm9kZSBkZXZpY2VzIGZy b20gZmlsZXMgc3RvcmVkIG9uCiAJCSMgbm9uLXJvb3QgcGFydGl0aW9uLiBTd2FwIGFuZCBtYWxs b2MgbWQoNCkgZGV2aWNlcyBoYXZlIGFscmVhZHkK --001636eefd2a81717e049511ae0d-- From owner-freebsd-rc@FreeBSD.ORG Mon Nov 15 11:07:03 2010 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A721106570D for ; Mon, 15 Nov 2010 11:07:03 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5C4448FC15 for ; Mon, 15 Nov 2010 11:07:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oAFB73w2086403 for ; Mon, 15 Nov 2010 11:07:03 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oAFB72wD086401 for freebsd-rc@FreeBSD.org; Mon, 15 Nov 2010 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 15 Nov 2010 11:07:02 GMT Message-Id: <201011151107.oAFB72wD086401@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-rc@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-rc@FreeBSD.org X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 15 Nov 2010 11:07:03 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/151063 rc [rc.subr] Verify network link and packet flow before s o conf/150752 rc [rc.subr] [patch] be not needed to eval $_pidcmd on re o conf/150474 rc [patch] rc.d/accounting: Add ability to set location o o conf/149867 rc [PATCH] rc.d script to manage multiple FIBS (kern opti o conf/149831 rc [PATCH] add support to /etc/rc.d/jail for delegating Z o conf/148656 rc rc.firewall(8): {oip} and {iip} variables in rc.firewa o conf/147685 rc [rc.d] [patch] new feature for /etc/rc.d/fsck o conf/147444 rc [rc.d] [patch] /etc/rc.d/zfs stop not called on reboot o conf/146053 rc [patch] [request] shutdown of jails breaks inter-jail o conf/145445 rc [rc.d] error in /etc/rc.d/jail (bad logic) o conf/145440 rc [rc.d] [patch] add multiple fib support (setfib) in /e o conf/145399 rc [patch] rc.d scripts are unable to start/stop programs o conf/145344 rc [patch] Fix kitchen sink approach for rc.d scripts ins o conf/145009 rc [patch] rc.subr(8): rc.conf should allow mac label con o conf/144213 rc [rc.d] [patch] Disappearing zvols on reboot o conf/143637 rc [patch] ntpdate(8) support for ntp-servers supplied by o conf/143085 rc [patch] ftp-proxy(8) rc(8) with multiple instances o conf/143084 rc [jail] [patch]: fix rc.d/jail creating stray softlinks o conf/142973 rc [jail] [patch] Strange counter init value in jail rc o conf/142434 rc [patch] Add cpuset(1) support to rc.subr(8) o conf/142304 rc rc.conf(5): mdconfig and mdconfig2 rc.d scripts lack e o conf/141909 rc rc.subr(8): [patch] add rc.conf.d support to /usr/loca o conf/141907 rc [rc.d] Bug if mtu (maybe others?) is set as first argu o conf/141678 rc [patch] A minor enhancement to how /etc/rc.d/jail dete o conf/141275 rc [request] dhclient(8) rc script should print something o conf/140440 rc [patch] allow local command files in rc.{suspend,resum o conf/140261 rc [patch] Improve flexibility of mdconfig2 startup scrip o conf/138208 rc [rc.d] [patch] Making rc.firewall (workstation) IPv6 a o conf/137629 rc [rc.d] background_dhclient rc.conf option causing doub o conf/137470 rc [PATCH] /etc/rc.d/mdconfig2 : prioritize cli parameter o conf/137271 rc [rc.d] Cannot update /etc/host.conf when root filesyst o conf/136875 rc [request] _flags appending o conf/136624 rc [rc.d] sysctl variables for ipnat are not applied on b o conf/135338 rc [rc.d] pf startup order seems broken [regression] o conf/134918 rc [patch] rc.subr fails to detect perl daemons o conf/134660 rc [patch] rc-script for initializing ng_netflow+ng_ipfw o conf/134333 rc PPP configuration problem in the rc.d scripts in combi o conf/134006 rc [patch] Unload console screensaver kernel modules if s o conf/133987 rc [rc.d] defaultroute broken with DHCP in some cases o conf/133890 rc [patch] sshd(8): add multiple profiles to the rc.d scr o conf/132483 rc rc.subr(8) [patch] setfib(1) support for rc.subr o conf/132476 rc [rc.d] [patch] add support setfib(1) in rc.d/routing o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o bin/126562 rc rcorder(8) fails to run unrelated startup scripts when o conf/126392 rc [patch] rc.conf ifconfig_xx keywords cannot be escaped p bin/126324 rc [patch] rc.d/tmp: Prevent mounting /tmp in second tim o conf/124747 rc [patch] savecore can't create dump from encrypted swap o conf/124248 rc [jail] [patch] add support for nice value for rc.d/jai o conf/123734 rc [patch] Chipset VIA CX700 requires extra initializatio o conf/123222 rc [patch] Add rtprio(1)/idprio(1) support to rc.subr(8). o conf/122968 rc [rc.d] /etc/rc.d/addswap: md swapfile multiplication a o conf/122477 rc [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring o conf/122170 rc [patch] [request] New feature: notify admin via page o o kern/121566 rc [nfs] [request] [patch] ethernet iface should be broug o conf/120431 rc [patch] devfs.rules are not initialized under certain o conf/120406 rc [devd] [patch] Handle newly attached pcm devices (eg. o conf/119874 rc [patch] "/etc/rc.d/pf reload" fails if there are macro o conf/119076 rc [patch] [rc.d] /etc/rc.d/netif tries to remove alias a o bin/118325 rc [patch] [request] new periodic script to test statuses o conf/118255 rc savecore never finding kernel core dumps (rcorder prob o conf/117935 rc [patch] ppp fails to start at boot because of missing o conf/113915 rc [patch] ndis wireless driver fails to associate when i o conf/109980 rc /etc/rc.d/netif restart doesn't destroy cloned_interfa o conf/109562 rc [rc.d] [patch] [request] Make rc.d/devfs usable from c o conf/108589 rc rtsol(8) fails due to default ipfw rules o conf/106009 rc [ppp] [patch] [request] Fix pppoed startup script to p o conf/105689 rc [ppp] [request] syslogd starts too late at boot o conf/105568 rc [patch] [request] Add more flexibility to rc.conf, to o conf/105145 rc [ppp] [patch] [request] add redial function to rc.d/pp o conf/104549 rc [patch] rc.d/nfsd needs special _find_processes functi o conf/102700 rc [geli] [patch] Add encrypted /tmp support to GELI/GBDE o conf/99721 rc [patch] /etc/rc.initdiskless problem copy dotfile in s o conf/99444 rc [patch] Enhancement: rc.subr could easily support star o conf/96343 rc [patch] rc.d order change to start inet6 before pf o conf/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d o conf/92523 rc [patch] allow rc scripts to kill process after a timeo o conf/89870 rc [patch] [request] make netif verbose rc.conf toggle o conf/89061 rc [patch] IPv6 6to4 auto-configuration enhancement o conf/88913 rc [patch] wrapper support for rc.subr o conf/85819 rc [patch] script allowing multiuser mode in spite of fsc o kern/81006 rc ipnat not working with tunnel interfaces on startup o conf/77663 rc Suggestion: add /etc/rc.d/addnetswap after addcritremo o conf/73677 rc [patch] add support for powernow states to power_profi o conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} o conf/56934 rc [patch] rc.firewall rules for natd expect an interface o conf/45226 rc [patch] Fix for rc.network, ppp-user annoyance o conf/44170 rc [patch] Add ability to run multiple pppoed(8) on start 87 problems total. From owner-freebsd-rc@FreeBSD.ORG Tue Nov 16 03:27:34 2010 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A019E1065679 for ; Tue, 16 Nov 2010 03:27:34 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 34EC78FC14 for ; Tue, 16 Nov 2010 03:27:33 +0000 (UTC) Received: by wwd20 with SMTP id 20so238209wwd.31 for ; Mon, 15 Nov 2010 19:27:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=BFzshtjVHeNHawZINJhaBu007H+RX3n+XU5YlnKaQk0=; b=Ndi3RvGDkuPkJ90LqoM0mXVWWnFzW9UTXxrlenGMXdxyK7FND1c5nU7qEp55XFBzpk M8v+yx2XjfSImmaXLDgbWtVeYYI8ewdmlzNRCkh3CqOnIu29fiNTibBLIKjsOcNfGN3o Bhiq4Xt7JdhjcBupF0AWbr62p0pMLt0vab8SU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=eLtGTzuKFz56C8IpZH+2TOSoh6T5OEPHqp3M3z55Om0BQlQZ7b7T7YDJf3UEOj0a8E TlYd2DIH/NY4fwwL5eLrTBIrN+prKbqBxAm/rDeYyJJ6i6Trjixgq8SHBfJKhFadKhtk CD37OSI3uV+/HQeFj/GnCR0R8HbS3NqO+cHF4= MIME-Version: 1.0 Received: by 10.216.50.134 with SMTP id z6mr7357169web.15.1289878052723; Mon, 15 Nov 2010 19:27:32 -0800 (PST) Received: by 10.216.198.27 with HTTP; Mon, 15 Nov 2010 19:27:32 -0800 (PST) Date: Mon, 15 Nov 2010 19:27:32 -0800 Message-ID: From: Garrett Cooper To: rc@freebsd.org Content-Type: multipart/mixed; boundary=0016e6dd96c722da5d049523232b Cc: Subject: rc.d/hostname dependency on netif backwards? X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 16 Nov 2010 03:27:34 -0000 --0016e6dd96c722da5d049523232b Content-Type: text/plain; charset=ISO-8859-1 It looks like existing code for rc.d/hostname might be backwards: %/etc/rc.d/hostname restart + /sbin/sysctl -n security.jail.jailed + [ 0 -eq 1 ] + /bin/hostname -s + hostname_s=2(SERVFAIL) + [ -n 2(SERVFAIL) ] + return + _return=0 + [ 0 -ne 0 ] + return 0 + _run_rc_postcmd + [ -n ] + return 0 + return 0 %sysctl -a | grep hostname kern.hostname: 2(SERVFAIL) security.jail.set_hostname_allowed: 1 Why is it trying to resolve a hostname (hostname -s) before the network's up? I could understand if this was a statically defined hostname, but all of my hostnames are derived from pxebooting ala dhcpd / named, not a static value :). I have a lame patch attached (it hasn't worked so far with 7.x from boot, but it works after the network's up and happy, etc; it might work with CURRENT with the network state wait change), but I'm wondering who sets hostname (etc/rc.d/hostname?) s.t. the SERVFAIL check can be removed. Thanks! -Garrett --0016e6dd96c722da5d049523232b Content-Type: text/x-patch; charset=US-ASCII; name="etc-rc.d-hostname-hack.patch" Content-Disposition: attachment; filename="etc-rc.d-hostname-hack.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ggk810490 SW5kZXg6IGV0Yy9yYy5kL2hvc3RuYW1lCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGV0Yy9yYy5kL2hvc3RuYW1l CShyZXZpc2lvbiAyMTUxNTcpCisrKyBldGMvcmMuZC9ob3N0bmFtZQkod29ya2luZyBjb3B5KQpA QCAtMzksNiArMzksOCBAQAogCiBob3N0bmFtZV9zdGFydCgpCiB7CisJbG9jYWwgaG9zdG5hbWVf cworCiAJIyBJZiB3ZSBhcmUgbm90IGluc2lkZSBhIGphaWwsIHNldCB0aGUgaG9zdCBuYW1lIGlm IGl0IGlzIG5vdCBhbHJlYWR5IHNldC4KIAkjIElmIHdlIGFyZSBpbnNpZGUgYSBqYWlsLCBzZXQg dGhlIGhvc3QgbmFtZSBldmVuIGlmIGl0IGlzIGFscmVhZHkgc2V0LAogCSMgYnV0IGZpcnN0IGNo ZWNrIGlmIGl0IGlzIHBlcm1pdHRlZC4KQEAgLTQ3LDcgKzQ5LDggQEAKIAkJaWYgWyBgJFNZU0NU TF9OIHNlY3VyaXR5LmphaWwuc2V0X2hvc3RuYW1lX2FsbG93ZWRgIC1lcSAwIF07IHRoZW4KIAkJ CXJldHVybgogCQlmaQotCWVsaWYgWyAtbiAiYC9iaW4vaG9zdG5hbWUgLXNgIiBdOyB0aGVuCisJ ZWxpZiBob3N0bmFtZV9zPWAvYmluL2hvc3RuYW1lIC1zYCAmJiBbIC1uICIkaG9zdG5hbWVfcyIg XSAmJiBcCisJICAgICEgZXhwciAiJGhvc3RuYW1lX3MiIDogJzIoU0VSVkZBSUwpJyAyPi9kZXYv bnVsbDsgdGhlbgogCQlyZXR1cm4KIAllbHNlCiAJCSMgSWYgd2UncmUgbm90IGluIGEgamFpbCBh bmQgcmMuY29uZiBkb2Vzbid0IHNwZWNpZnkgYQo= --0016e6dd96c722da5d049523232b-- From owner-freebsd-rc@FreeBSD.ORG Thu Nov 18 22:31:05 2010 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2CFC1065675 for ; Thu, 18 Nov 2010 22:31:05 +0000 (UTC) (envelope-from i@levsha.me) Received: from expo.ukrweb.net (mail.univua.net [91.202.128.78]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5DF8FC22 for ; Thu, 18 Nov 2010 22:31:04 +0000 (UTC) Received: from [95.132.172.122] (helo=laptop.levsha.me) by expo.ukrweb.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1PJCW1-000KJW-Hv for freebsd-rc@FreeBSD.org; Thu, 18 Nov 2010 23:59:39 +0200 Received: from levsha by laptop.levsha.me with local (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PJCUm-0001XV-9Q for freebsd-rc@FreeBSD.org; Thu, 18 Nov 2010 23:58:20 +0200 Date: Thu, 18 Nov 2010 23:58:20 +0200 From: Mykola Dzham To: freebsd-rc@FreeBSD.org Message-ID: <20101118215820.GA4531@laptop.levsha.me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: Mykola Dzham X-SA-Exim-Connect-IP: 95.132.172.122 X-SA-Exim-Mail-From: i@levsha.me X-SA-Exim-Scanned: No (on expo.ukrweb.net); SAEximRunCond expanded to false X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: rc.d/natd loads ipdivert.ko too late X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 18 Nov 2010 22:31:06 -0000 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Currently starting natd moved to separate script rc.d/natd . In this script ipdivert is set in required_modules . But rc.d/natd called from rc.firewall after loading firewall rules. As result, when no ipdivert in kernel, firewall_type is OPEN or CLIENT and natd_enable is set to yes, rc.firewall attempt to add rule ${fwcmd} add 50 divert natd ip4 from any to any via ${natd_interface} and error ipfw: getsockopt(IP_FW_ADD): Invalid argument occurs. I think correct solution is add natd_enable checking into ipfw prestart function (patch attached). Is this correct? -- LEFT-(UANIC|RIPE) JID: levsha@jabber.net.ua PGP fingerprint: 1BCD 7C80 2E04 7282 C944 B0E0 7E67 619E 4E72 9280 --PEIAKu/WMn1b1Hv9-- From owner-freebsd-rc@FreeBSD.ORG Thu Nov 18 22:47:29 2010 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29966106564A for ; Thu, 18 Nov 2010 22:47:29 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id BB6998FC12 for ; Thu, 18 Nov 2010 22:47:28 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id BEC4235A865; Thu, 18 Nov 2010 23:47:27 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id B16DA17765; Thu, 18 Nov 2010 23:47:27 +0100 (CET) Date: Thu, 18 Nov 2010 23:47:27 +0100 From: Jilles Tjoelker To: Garrett Cooper Message-ID: <20101118224727.GB95648@stack.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: rc@freebsd.org Subject: Re: rc.d/hostname dependency on netif backwards? X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 18 Nov 2010 22:47:29 -0000 On Mon, Nov 15, 2010 at 07:27:32PM -0800, Garrett Cooper wrote: > It looks like existing code for rc.d/hostname might be backwards: > %/etc/rc.d/hostname restart > + /sbin/sysctl -n security.jail.jailed > + [ 0 -eq 1 ] > + /bin/hostname -s > + hostname_s=2(SERVFAIL) > + [ -n 2(SERVFAIL) ] > + return > + _return=0 > + [ 0 -ne 0 ] > + return 0 > + _run_rc_postcmd > + [ -n ] > + return 0 > + return 0 > %sysctl -a | grep hostname > kern.hostname: 2(SERVFAIL) > security.jail.set_hostname_allowed: 1 > Why is it trying to resolve a hostname (hostname -s) before the > network's up? I could understand if this was a statically defined > hostname, but all of my hostnames are derived from pxebooting ala > dhcpd / named, not a static value :). /bin/hostname is just a wrapper around gethostname()/sethostname(). It does not use DNS (some versions of GNU hostname do). You should try to find what is setting the hostname to 2(SERVFAIL). A cause could be not checking host(1)'s exit status -- it prints any error message to stdout. Neither /etc/rc.d/hostname nor /sbin/dhclient-script appear to do anything like that. -- Jilles Tjoelker From owner-freebsd-rc@FreeBSD.ORG Thu Nov 18 23:28:44 2010 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13A35106566C for ; Thu, 18 Nov 2010 23:28:44 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF238FC0C for ; Thu, 18 Nov 2010 23:28:43 +0000 (UTC) Received: by wyb35 with SMTP id 35so3002880wyb.13 for ; Thu, 18 Nov 2010 15:28:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/kY4VX/Llr8TcBzr3cN82/TeIXoCbMgPvVyISH0kOd0=; b=rkL6rfD03FNcYUpjhhELo1e/drD8nIgqCj6kFGygC0FpAuMKcjOJJ4X5h5QMoB+DDg DTaq2di9C4sS3XNJM/AHfUWzwOP96QYnlskZ+YAk0t68lAFoW+wOO2jEDm5e/H47L2aS AkO2FZ1aah4KUvykFg0/oqmt+EgxROSxreaAY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=J2aHKoUGLiBKg5mCyyDheCBr5vBFjGsgn7H6CkNM5H6epFHFIfpP/FvKXGYOghnUmX 9xkupXMBDGonH6Pp+N4NlfFL6Eq6MWT5k7HX6OLZ4ViiVBMrcHMmhn1X+SA4Hw8AO1re oGVtUd1OHtQdTzYto+fDXVO3HNqYvGCk4gkS4= MIME-Version: 1.0 Received: by 10.216.7.210 with SMTP id 60mr172307wep.30.1290122922032; Thu, 18 Nov 2010 15:28:42 -0800 (PST) Received: by 10.216.198.27 with HTTP; Thu, 18 Nov 2010 15:28:41 -0800 (PST) In-Reply-To: <20101118224727.GB95648@stack.nl> References: <20101118224727.GB95648@stack.nl> Date: Thu, 18 Nov 2010 15:28:41 -0800 Message-ID: From: Garrett Cooper To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: rc@freebsd.org Subject: Re: rc.d/hostname dependency on netif backwards? X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 18 Nov 2010 23:28:44 -0000 On Thu, Nov 18, 2010 at 2:47 PM, Jilles Tjoelker wrote: > On Mon, Nov 15, 2010 at 07:27:32PM -0800, Garrett Cooper wrote: >> =A0 =A0 It looks like existing code for rc.d/hostname might be backwards= : > >> %/etc/rc.d/hostname restart >> + /sbin/sysctl -n security.jail.jailed >> + [ 0 -eq 1 ] >> + /bin/hostname -s >> + hostname_s=3D2(SERVFAIL) >> + [ -n 2(SERVFAIL) ] >> + return >> + _return=3D0 >> + [ 0 -ne 0 ] >> + return 0 >> + _run_rc_postcmd >> + [ -n =A0] >> + return 0 >> + return 0 >> %sysctl -a | grep hostname >> kern.hostname: 2(SERVFAIL) >> security.jail.set_hostname_allowed: 1 > >> =A0 =A0 Why is it trying to resolve a hostname (hostname -s) before the >> network's up? I could understand if this was a statically defined >> hostname, but all of my hostnames are derived from pxebooting ala >> dhcpd / named, not a static value :). > > /bin/hostname is just a wrapper around gethostname()/sethostname(). It > does not use DNS (some versions of GNU hostname do). Sure. > You should try to find what is setting the hostname to 2(SERVFAIL). A This is actually a gai_strerror. > cause could be not checking host(1)'s exit status -- it prints any error > message to stdout. Yeah... that's a bit annoying -- it should go to stderr. > Neither /etc/rc.d/hostname nor /sbin/dhclient-script appear to do anythin= g like that. Yeah... it's kind of weird. On the bright side it doesn't happen with (relatively) vanilla CURRENT. I'm not sure what IronPort changes have been made to our FreeBSD 7.1 image that might have broken this (if 7.1 didn't work already this way), but I'm not going to concern myself too much about it now. The workaround is trivial... Thanks, -Garrett From owner-freebsd-rc@FreeBSD.ORG Fri Nov 19 11:22:58 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D7CF106567A; Fri, 19 Nov 2010 11:22:58 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 85AA08FC20; Fri, 19 Nov 2010 11:22:57 +0000 (UTC) Received: by qyk9 with SMTP id 9so620847qyk.13 for ; Fri, 19 Nov 2010 03:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=oe4cvvvBeNuc59PY2r6QPCfHn3b++VLtw4YnNTbw2+4=; b=or1qR64DTnKNSC7Y+epwWTbPyjUzfA8v/JS8umEwq+ESE8sV36PaJ4bQm5yNOmPSrX Zj/ZA0PzxVCy4LOF4srZJXXAIpVAf8SI/Or/LZ21F0vOwiM7ts4b/4uaBUwiazvzalcu 98Fr8gnEvyiudJOA9aQu4qKT+8qcsDCQqc1yM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=HGWt/w7iQP21XI2HKd2RSLKCWXpmRXcvlptBGk+ZIvduP8GfA8Azxj2/ncamulVuf4 2GAH0tlr5jYRHMyn2GqVGaPDGEiOLny/9/a78++S0VE6KbQTbBdSLzsm1zyD10rxMlmA o3SYRvEzE8oOp+tRQEK5qM61dl0fB89q/8zLE= MIME-Version: 1.0 Received: by 10.229.229.135 with SMTP id ji7mr1686531qcb.100.1290164142194; Fri, 19 Nov 2010 02:55:42 -0800 (PST) Received: by 10.229.69.135 with HTTP; Fri, 19 Nov 2010 02:55:42 -0800 (PST) In-Reply-To: <20101011.192914.82309657.hrs@allbsd.org> References: <4C76CA06.5010001@FreeBSD.org> <20101011.192914.82309657.hrs@allbsd.org> Date: Fri, 19 Nov 2010 13:55:42 +0300 Message-ID: From: Sergey Kandaurov To: Hiroki Sato Content-Type: multipart/mixed; boundary=0016363b8f2065c2b3049565bf68 Cc: dougb@freebsd.org, freebsd-rc@freebsd.org, freebsd-current@freebsd.org Subject: Re: [RFC] ifconfig description support in rc.d X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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, 19 Nov 2010 11:22:58 -0000 --0016363b8f2065c2b3049565bf68 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 11 October 2010 14:29, Hiroki Sato wrote: > Hi, > > pluknet wrote > =A0in : > > pl> On 27 August 2010 00:09, Doug Barton wrote: > pl> > On 08/26/2010 12:53 PM, pluknet wrote: > pl> >> > pl> >> [cc'ing current@ as rc@ looks too quite] > pl> >> > pl> >> Hi. > pl> >> > pl> >> Since ifconfig has grown to label interfaces with > pl> >> ifconfig $ifname description "foobar", what about > pl> >> to give it more life and store i/face descriptions > pl> >> semi-permanently, so they will survive between reboots? > pl> >> > pl> >> This patch adds a functionality to rc.d to label > pl> >> interfaces at boot time. > pl> >> > pl> >> Comments are welcome. > pl> > > pl> > This seems like a good addition, thanks. Please also write a patch = for > pl> > rc.conf.5 to describe this new functionality and I'll be happy to c= ommit it. > pl> > pl> Xin Li helped me with updating rc.conf.5 (thanks!). > pl> It's included in attached patch. > (snip) > pl> >> + =A0 =A0 =A0 # ifconfig_IF_descr > pl> >> + =A0 =A0 =A0 for _if in `ifconfig -l`; do > > =A0I think using "ifconfig -l" here is not a good idea. =A0Setting a > =A0description for each interface in a function invoked by ifn_start() > =A0would be better. > > =A0This is beacuse the netif script can be run not only at boottime but > =A0also via devd or by hand for a specific interface. =A0So, if the > =A0ifnet_descr is there, "/etc/rc.d/netif start IF" does not make it > =A0run. =A0Since the description is a per-interface property, > =A0"/etc/rc.d/netif start IF" should set one, and "/etc/rc.d/netif stop > =A0IF" should clear one, IMHO. > > =A0Also, "ifconfig -l" is not compatible with $network_interfaces, so > =A0you need to use list_net_interface() for that purpose instead (if you > =A0move ifnet_descr() into ifn_start() it is useless, though). > Actually, both versions were developed at the same time. This one follows "netif" approach. Somehow it was rejected by me for some reasons which I don't remember for now. That's why I didn't include it to my original message. Please, see attached. --=20 wbr, pluknet P.S. Google marks patches as (application/octet-stream). Bad Google. --0016363b8f2065c2b3049565bf68 Content-Type: application/octet-stream; name="descr.rc.d.netif.patch" Content-Disposition: attachment; filename="descr.rc.d.netif.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ggoyd0vv1 SW5kZXg6IGV0Yy9uZXR3b3JrLnN1YnIKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gZXRjL25ldHdvcmsuc3Vicgko cmV2aXNpb24gMjE1NDIzKQorKysgZXRjL25ldHdvcmsuc3Vicgkod29ya2luZyBjb3B5KQpAQCAt NDcsNiArNDcsNyBAQAogCWlwdjRfdXAgJHtpZm59ICYmIGNmZz0wCiAJaXB2Nl91cCAke2lmbn0g JiYgY2ZnPTAKIAlpcHhfdXAgJHtpZm59ICYmIGNmZz0wCisJaWZkZXNjcl91cCAke2lmbn0gJiYg Y2ZnPTAKIAljaGlsZGlmX2NyZWF0ZSAke2lmbn0gJiYgY2ZnPTAKIAogCXJldHVybiAkY2ZnCkBA IC02OSw2ICs3MCw3IEBACiAJaXB2NF9kb3duICR7aWZufSAmJiBjZmc9MAogCWlmY29uZmlnX2Rv d24gJHtpZm59ICYmIGNmZz0wCiAJaWZzY3JpcHRfZG93biAke2lmbn0gJiYgY2ZnPTAKKwlpZmRl c2NyX2Rvd24gJHtpZm59ICYmIGNmZz0wCiAJY2hpbGRpZl9kZXN0cm95ICR7aWZufSAmJiBjZmc9 MAogCiAJcmV0dXJuICRjZmcKQEAgLTEyMTQsNiArMTIxNiwzNSBAQAogCXJldHVybiAwCiB9CiAK KyMgaWZkZXNjcl91cCBpZgorIwlBZGQgZGVzY3JpcHRpb24gdG8gdGhlIGludGVyZmFjZSAkaWYu CisjCitpZmRlc2NyX3VwKCkKK3sKKwlsb2NhbCBfaWYgX2lmZGVzY3IKKworCV9pZj0kMQorCV9p ZmRlc2NyPSJgZ2V0X2lmX3ZhciAkX2lmIGlmY29uZmlnX0lGX2Rlc2NyYCIKKwlpZiBbICEgLXog IiRfaWZkZXNjciIgXTsgdGhlbgorCQlpZmNvbmZpZyAkX2lmIGRlc2NyICIkX2lmZGVzY3IiCisJ ZmkKKworCXJldHVybiAwCit9CisKKyMgaWZkZXNjcl9kb3duIGlmCisjCVJlbW92ZSBkZXNjcmlw dGlvbiBmcm9tIHRoZSBpbnRlcmZhY2UgJGlmLgorIworaWZkZXNjcl9kb3duKCkKK3sKKwlsb2Nh bCBfaWYgX2lmZGVzY3IKKworCV9pZj0kMQorCWlmY29uZmlnICRfaWYgLWRlc2NyCisKKwlyZXR1 cm4gMAorfQorCiAjIGxpc3RfbmV0X2ludGVyZmFjZXMgdHlwZQogIwlMaXN0IGFsbCBuZXR3b3Jr IGludGVyZmFjZXMuIFRoZSB0eXBlIG9mIGludGVyZmFjZSByZXR1cm5lZAogIwljYW4gYmUgY29u dHJvbGxlZCBieSB0aGUgdHlwZSBhcmd1bWVudC4gVGhlIHR5cGUKSW5kZXg6IGV0Yy9kZWZhdWx0 cy9yYy5jb25mCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT0KLS0tIGV0Yy9kZWZhdWx0cy9yYy5jb25mCShyZXZpc2lvbiAy MTU0MjMpCisrKyBldGMvZGVmYXVsdHMvcmMuY29uZgkod29ya2luZyBjb3B5KQpAQCAtMjE0LDYg KzIxNCw3IEBACiAjaWZjb25maWdfZWQwX2lwdjY9ImluZXQ2IDIwMDE6ZGI4OjE6OjEgcHJlZml4 bGVuIDY0IiAjIFNhbXBsZSBJUHY2IGFkZHIgZW50cnkKICNpZmNvbmZpZ19lZDBfYWxpYXMwPSJp bmV0NiAyMDAxOmRiODoyOjoxIHByZWZpeGxlbiA2NCIgIyBTYW1wbGUgSVB2NiBhbGlhcwogI2lm Y29uZmlnX2Z4cDBfbmFtZT0ibmV0MCIJIyBDaGFuZ2UgaW50ZXJmYWNlIG5hbWUgZnJvbSBmeHAw IHRvIG5ldDAuCisjaWZjb25maWdfZnhwMF9kZXNjcj0iVXBsaW5rIHRvIFN3aXRjaCAyIgkjIExh YmVsIGZ4cDAgaW50ZXJmYWNlCiAjdmxhbnNfZnhwMD0iMTAxIHZsYW4wIgkJIyB2bGFuKDQpIGlu dGVyZmFjZXMgZm9yIGZ4cDAgZGV2aWNlCiAjY3JlYXRlX2FyZ3NfdmxhbjA9InZsYW4gMTAyIgkj IHZsYW4gdGFnIGZvciB2bGFuMCBkZXZpY2UKICN3bGFuc19hdGgwPSJ3bGFuMCIJCSMgd2xhbig0 KSBpbnRlcmZhY2VzIGZvciBhdGgwIGRldmljZQo= --0016363b8f2065c2b3049565bf68-- From owner-freebsd-rc@FreeBSD.ORG Fri Nov 19 18:08:53 2010 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 730301065670; Fri, 19 Nov 2010 18:08:53 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id CF6D98FC14; Fri, 19 Nov 2010 18:08:52 +0000 (UTC) Received: by wyb35 with SMTP id 35so3938878wyb.13 for ; Fri, 19 Nov 2010 10:08:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=T6hpIAulMfXqCBWF4T+ng/viExkNOVGn4xKXMrREhx0=; b=HpznpEUEHiJVdpjfWqoaIQ8SXD5OF3MC6zFz/TGs3A32PttzjC12g5LQ9uUZJIWIiw 0QWOjzYIKhAMdEympnhPBAqkRUnG9CBEtNRfiOJPrdOAqDUn3bDDC8pSMJb6rUg5o/ol EjVRSYd4G5N6g9Qnb/cXQOVk72QKJFlKThA/o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=GuQpQUd1WMydgLeV2eTkz1+wbCQ4QB//jUWMarvmd4Mv2Ujp0uzeKlUT45+g5pmd25 7NmwCv9vfPDw/G0muUEzTYeLC1WU/ekyqyDnnI1EvJfUZQwUf2MZhwnN34DUOW+AJiAn BHJauI3MWRcVtTTimAl8b7KJ4GLiSUjBu0BWs= MIME-Version: 1.0 Received: by 10.216.82.197 with SMTP id o47mr2363223wee.45.1290188602928; Fri, 19 Nov 2010 09:43:22 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Fri, 19 Nov 2010 09:43:22 -0800 (PST) In-Reply-To: References: <4C76CA06.5010001@FreeBSD.org> <20101011.192914.82309657.hrs@allbsd.org> Date: Fri, 19 Nov 2010 09:43:22 -0800 X-Google-Sender-Auth: KZf6OJWmUmF7uRaowXZOYh5G4IA Message-ID: From: Garrett Cooper To: Sergey Kandaurov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-rc@freebsd.org, freebsd-current@freebsd.org, dougb@freebsd.org Subject: Re: [RFC] ifconfig description support in rc.d X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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, 19 Nov 2010 18:08:53 -0000 On Fri, Nov 19, 2010 at 2:55 AM, Sergey Kandaurov wrote= : > On 11 October 2010 14:29, Hiroki Sato wrote: >> Hi, >> >> pluknet wrote >> =A0in : >> >> pl> On 27 August 2010 00:09, Doug Barton wrote: >> pl> > On 08/26/2010 12:53 PM, pluknet wrote: >> pl> >> >> pl> >> [cc'ing current@ as rc@ looks too quite] >> pl> >> >> pl> >> Hi. >> pl> >> >> pl> >> Since ifconfig has grown to label interfaces with >> pl> >> ifconfig $ifname description "foobar", what about >> pl> >> to give it more life and store i/face descriptions >> pl> >> semi-permanently, so they will survive between reboots? >> pl> >> >> pl> >> This patch adds a functionality to rc.d to label >> pl> >> interfaces at boot time. >> pl> >> >> pl> >> Comments are welcome. >> pl> > >> pl> > This seems like a good addition, thanks. Please also write a patch= for >> pl> > rc.conf.5 to describe this new functionality and I'll be happy to = commit it. >> pl> >> pl> Xin Li helped me with updating rc.conf.5 (thanks!). >> pl> It's included in attached patch. >> (snip) >> pl> >> + =A0 =A0 =A0 # ifconfig_IF_descr >> pl> >> + =A0 =A0 =A0 for _if in `ifconfig -l`; do >> >> =A0I think using "ifconfig -l" here is not a good idea. =A0Setting a >> =A0description for each interface in a function invoked by ifn_start() >> =A0would be better. >> >> =A0This is beacuse the netif script can be run not only at boottime but >> =A0also via devd or by hand for a specific interface. =A0So, if the >> =A0ifnet_descr is there, "/etc/rc.d/netif start IF" does not make it >> =A0run. =A0Since the description is a per-interface property, >> =A0"/etc/rc.d/netif start IF" should set one, and "/etc/rc.d/netif stop >> =A0IF" should clear one, IMHO. >> >> =A0Also, "ifconfig -l" is not compatible with $network_interfaces, so >> =A0you need to use list_net_interface() for that purpose instead (if you >> =A0move ifnet_descr() into ifn_start() it is useless, though). >> > > Actually, both versions were developed at the same time. > This one follows "netif" approach. Somehow it was rejected > by me for some reasons which I don't remember for now. > That's why I didn't include it to my original message. > > Please, see attached. + _ifdescr=3D"`get_if_var $_if ifconfig_IF_descr`" + if [ ! -z "$_ifdescr" ]; then + ifconfig $_if descr "$_ifdescr" + fi + + return 0 What if the above fails? There are other potential problem areas as well in network.subr (ifscript_up for instance). Thanks, -Garrett > P.S. > Google marks patches as (application/octet-stream). Bad Google. Only if the extension isn't .patch (and it's not just Google -- blame it on other software like Mailman as well) :)...