From owner-freebsd-rc@FreeBSD.ORG Mon Apr 29 11:06:50 2013 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F10323C7 for ; Mon, 29 Apr 2013 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E20931930 for ; Mon, 29 Apr 2013 11:06:50 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3TB6o8H018253 for ; Mon, 29 Apr 2013 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3TB6oHt018251 for freebsd-rc@FreeBSD.org; Mon, 29 Apr 2013 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 29 Apr 2013 11:06:50 GMT Message-Id: <201304291106.r3TB6oHt018251@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 Subject: Current problem reports assigned to freebsd-rc@FreeBSD.org 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: Mon, 29 Apr 2013 11:06:51 -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/177217 rc [patch] rc.d/ddb -- squelch warning when ddb_enable=ye o conf/177089 rc ntpd startup script does not work well o conf/176347 rc [rc.conf] [patch] Add support for firewall deny lists o conf/176181 rc [rc.subr] rc.subr emitting warnings for non-defined xx o conf/175311 rc [patch] add "dump" fs type support to rc.d/dumpon o conf/175105 rc /etc/rc.d/* and more: syntax 'return_boolean_cmd && do o conf/175079 rc [rc.subr] [patch] rc.subr poorly handles recursive run o bin/173153 rc [rc.d] [patch] $netwait_ip should be more parallel o conf/172787 rc [rc.conf] FreeBSD 9.x broken alias syntax on vlan inte o conf/172532 rc [rc] [patch] service routing restart always fails o conf/169047 rc [rc.subr] [patch] /etc/rc.subr not checking some scrip o bin/168544 rc [patch] [rc]: addswap-mounted swapfiles cause panic on o conf/167566 rc [rc.d] [patch] ipdivert module loading vs. ipfw rc.d o o conf/166484 rc [rc] [patch] rc.initdiskless patch for different major o conf/165769 rc [rc][jai][ipv6] IPv6 Initialization on external iface o conf/164393 rc [rc.d] restarting netif with static addresses doesn't o conf/163508 rc [rc.subr] [patch] Add "enable" and "disable" commands o conf/163488 rc Confusing explanation in defaults/rc.conf o conf/163321 rc [rc.conf] [patch] allow _fib syntax in rc.conf o conf/162642 rc .sh scripts in /usr/local/etc/rc.d get executed, not s o conf/161107 rc [rc] stop_boot in mountcritlocal usage is incorrect. o conf/160403 rc [rc] [patch] concurrently running rc-scripts during bo o conf/160240 rc rc.d/mdconfig and mdconfig2 should autoset $_type to v o conf/159846 rc [rc.conf] routing_stop_inet6() logic doesn't handle ip o conf/158557 rc [patch] /etc/rc.d/pf broken messages o conf/158127 rc [patch] remount_optional option in rc.initdiskless doe o conf/153666 rc [rc.d][patch] mount filesystems from fstab over zfs da o conf/153200 rc post-boot /etc/rc.d/network_ipv6 start can miss neighb o conf/153123 rc [rc] [patch] add gsched rc file to automatically inser 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/145399 rc [patch] rc.d scripts are unable to start/stop programs o conf/145009 rc [patch] rc.subr(8): rc.conf should allow mac label con 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 a 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/141678 rc [patch] A minor enhancement to how /etc/rc.d/jail dete o conf/140440 rc [patch] allow local command files in rc.{suspend,resum o conf/140261 rc [patch] Improve flexibility of mdconfig2 startup scrip p conf/138208 rc [rc.d] [patch] Making rc.firewall (workstation) IPv6 a o conf/137271 rc [rc.d] Cannot update /etc/host.conf when root filesyst o conf/136624 rc [rc.d] sysctl variables for ipnat are not applied on b 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/133890 rc [patch] sshd(8): add multiple profiles to the rc.d scr o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o conf/126392 rc [patch] rc.conf ifconfig_xx keywords cannot be escaped 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 a 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 f conf/118255 rc savecore never finding kernel core dumps (rcorder prob f conf/117935 rc [patch] ppp fails to start at boot because of missing f conf/113915 rc [ndis] [patch] ndis wireless driver fails to associate 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 f conf/105689 rc [ppp] [request] syslogd starts too late at boot f conf/105145 rc [ppp] [patch] [request] add redial function to rc.d/pp f 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/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d f 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 a 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 a conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} f conf/56934 rc [patch] rc.firewall rules for natd expect an interface f conf/13775 rc multi-user boot may hang in NIS environment 87 problems total. From owner-freebsd-rc@FreeBSD.ORG Mon Apr 29 23:33:52 2013 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7876D692 for ; Mon, 29 Apr 2013 23:33:52 +0000 (UTC) (envelope-from rabe@uugrn.org) Received: from mx1.uugrn.org (mx1.uugrn.org [IPv6:2a03:2500:2::172:17]) by mx1.freebsd.org (Postfix) with ESMTP id EA3411E64 for ; Mon, 29 Apr 2013 23:33:51 +0000 (UTC) Received: from rabe.uugrn.org (rabe.uugrn.org [IPv6:2a03:2500:1:6:19::]) by mx1.uugrn.org (8.14.5/8.14.5) with ESMTP id r3TNXjVb029880 for ; Tue, 30 Apr 2013 01:33:50 +0200 (CEST) (envelope-from rabe@uugrn.org) Received: from rabox.fritz.box (rabe@rabe.uugrn.org [164.177.171.25]) by rabe.uugrn.org (8.14.5/8.14.5) with ESMTP id r3TNXia6018435 for ; Tue, 30 Apr 2013 01:33:45 +0200 (CEST) (envelope-from rabe@uugrn.org) Received: from rabox.fritz.box (localhost [127.0.0.1]) by rabox.fritz.box (8.14.4/8.14.4/Debian-2.1ubuntu1) with ESMTP id r3TNXiDd008419 for ; Tue, 30 Apr 2013 01:33:44 +0200 Received: (from rabe@localhost) by rabox.fritz.box (8.14.4/8.14.4/Submit) id r3TNXiY3008418 for freebsd-rc@freebsd.org; Tue, 30 Apr 2013 01:33:44 +0200 X-Authentication-Warning: rabox.fritz.box: rabe set sender to rabe@uugrn.org using -f Date: Tue, 30 Apr 2013 01:33:44 +0200 From: Raphael Eiselstein To: freebsd-rc@freebsd.org Subject: How to set resource limits (ulimit) per service with /etc/rc.subr and /etc/rc.conf Message-ID: <20130429233344.GA4769@ma.sigsys.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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: Mon, 29 Apr 2013 23:33:52 -0000 --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi everyone, we have some generic parameters for rc-scripts like=20 ${name}_program ${name}_chroot ${name}_flags ${name}_nice ${name}_user any many more. I'm looking for a way to configure different ulimits per service. It seems we have nothing about "ulimit" somewhere in /etc. I'd like to have a unique way to configure resource limits, hard and soft limits. Resource limits can be set within a script for the current process by=20 "ulimit [-HSabcdflmnpstuvw] [limit]" but not as a parameterised wrapper like "nice" or "chroot" or "su", so prepeding just another "ulimit" wrapper seems not to be an option. Is there a unique way to have resource limits per service? I didn't find any. AFAICS we have two options handling this: #1 writing a /bin/sh wrapper prepeding ${_doit} containing ulimit commands #2 having (someone) to build up a generic binary like nice(1) getting limit-parameters by commandline before execve'ing the final command, e.g.= =20 limitsh -Hv 20480 -Sv 10240 -n 300 -c command args Problem: shells shoud implement "-c command args" and ulimit uses -c for coredumpsize in 512byte blocks. To get around this: -Hc and -Sc are=20 hard/soft limits to corefilesize, a single "-c" is always the command-string like in sh(1)=20 Any ideas? Did I miss something? Regards Raphael --=20 Raphael Eiselstein http://rabe.uugrn.org/ xmpp:freibyter@gmx.de | https://www.xing.com/profile/Raphael_Eiselstein = =20 GnuPG: E7B2 1D66 3AF2 EDC7 9828 6D7A 9CDA 3E7B 10CA 9F2D =2E........|.........|.........|.........|.........|.........|.........|.. --Qxx1br4bt0+wmkIi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlF/A1gACgkQnNo+exDKny15xgCdGu4JBVzlCEra1zFX6blcoGY2 QAIAmwb+rwyklz1BbZelAGLJEfDlUu9A =/jbn -----END PGP SIGNATURE----- --Qxx1br4bt0+wmkIi-- From owner-freebsd-rc@FreeBSD.ORG Tue Apr 30 00:05:31 2013 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 651C5C74 for ; Tue, 30 Apr 2013 00:05:31 +0000 (UTC) (envelope-from rabe@uugrn.org) Received: from mx1.uugrn.org (mx1.uugrn.org [IPv6:2a03:2500:2::172:17]) by mx1.freebsd.org (Postfix) with ESMTP id F1EEA1F65 for ; Tue, 30 Apr 2013 00:05:30 +0000 (UTC) Received: from rabe.uugrn.org (rabe.uugrn.org [IPv6:2a03:2500:1:6:19::]) by mx1.uugrn.org (8.14.5/8.14.5) with ESMTP id r3U05PYA032663 for ; Tue, 30 Apr 2013 02:05:30 +0200 (CEST) (envelope-from rabe@uugrn.org) Received: from rabox.fritz.box (rabe@rabe.uugrn.org [164.177.171.25]) by rabe.uugrn.org (8.14.5/8.14.5) with ESMTP id r3U05OgQ020009 for ; Tue, 30 Apr 2013 02:05:25 +0200 (CEST) (envelope-from rabe@uugrn.org) Received: from rabox.fritz.box (localhost [127.0.0.1]) by rabox.fritz.box (8.14.4/8.14.4/Debian-2.1ubuntu1) with ESMTP id r3U05O9I008862 for ; Tue, 30 Apr 2013 02:05:24 +0200 Received: (from rabe@localhost) by rabox.fritz.box (8.14.4/8.14.4/Submit) id r3U05Ot6008861 for freebsd-rc@freebsd.org; Tue, 30 Apr 2013 02:05:24 +0200 X-Authentication-Warning: rabox.fritz.box: rabe set sender to rabe@uugrn.org using -f Date: Tue, 30 Apr 2013 02:05:24 +0200 From: Raphael Eiselstein To: freebsd-rc@freebsd.org Subject: Re: How to set resource limits (ulimit) per service with /etc/rc.subr and /etc/rc.conf Message-ID: <20130430000524.GB4769@ma.sigsys.de> References: <20130429233344.GA4769@ma.sigsys.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GRPZ8SYKNexpdSJ7" Content-Disposition: inline In-Reply-To: <20130429233344.GA4769@ma.sigsys.de> User-Agent: Mutt/1.5.21 (2010-09-15) 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: Tue, 30 Apr 2013 00:05:31 -0000 --GRPZ8SYKNexpdSJ7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 30, 2013 at 01:33:44AM +0200, Raphael Eiselstein wrote: > like "nice" or "chroot" or "su", so prepeding just another "ulimit" > wrapper seems not to be an option. I found some more generic idea about wrappers in rc.subr: conf/88913: [patch] wrapper support for rc.subr http://www.freebsd.org/cgi/query-pr.cgi?pr=3D88913 Defining a generic wrapper per service seems interesting in my case, but it's not in rc.subr yet. Regards Raphael --=20 Raphael Eiselstein http://rabe.uugrn.org/ xmpp:freibyter@gmx.de | https://www.xing.com/profile/Raphael_Eiselstein = =20 GnuPG: E7B2 1D66 3AF2 EDC7 9828 6D7A 9CDA 3E7B 10CA 9F2D =2E........|.........|.........|.........|.........|.........|.........|.. --GRPZ8SYKNexpdSJ7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlF/CsQACgkQnNo+exDKny2Q2gCePZf36j2iyUlDDehFMsv1Z8dL sRYAnizdd8o2hPV5Qct9AyeimtTLZwRO =s0v1 -----END PGP SIGNATURE----- --GRPZ8SYKNexpdSJ7-- From owner-freebsd-rc@FreeBSD.ORG Tue Apr 30 00:10:49 2013 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AA7F7D36; Tue, 30 Apr 2013 00:10:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id 82B891F89; Tue, 30 Apr 2013 00:10:49 +0000 (UTC) Received: from glenbarber.us (kaos.glenbarber.us [71.224.221.174]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id 7ACAB23F804; Mon, 29 Apr 2013 20:10:44 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.8.2 onyx.glenbarber.us 7ACAB23F804 Authentication-Results: onyx.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Mon, 29 Apr 2013 20:10:43 -0400 From: Glen Barber To: Raphael Eiselstein Subject: Re: How to set resource limits (ulimit) per service with /etc/rc.subr and /etc/rc.conf Message-ID: <20130430001043.GB1588@glenbarber.us> References: <20130429233344.GA4769@ma.sigsys.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jq0ap7NbKX2Kqbes" Content-Disposition: inline In-Reply-To: <20130429233344.GA4769@ma.sigsys.de> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-rc@freebsd.org 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: Tue, 30 Apr 2013 00:10:49 -0000 --jq0ap7NbKX2Kqbes Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 30, 2013 at 01:33:44AM +0200, Raphael Eiselstein wrote: > Hi everyone, >=20 > we have some generic parameters for rc-scripts like=20 > ${name}_program ${name}_chroot ${name}_flags ${name}_nice ${name}_user > any many more. >=20 > I'm looking for a way to configure different ulimits per service. It > seems we have nothing about "ulimit" somewhere in /etc. >=20 > I'd like to have a unique way to configure resource limits, hard and > soft limits. >=20 > Resource limits can be set within a script for the current process by=20 > "ulimit [-HSabcdflmnpstuvw] [limit]" but not as a parameterised wrapper > like "nice" or "chroot" or "su", so prepeding just another "ulimit" > wrapper seems not to be an option. >=20 > Is there a unique way to have resource limits per service? I didn't find > any. AFAICS we have two options handling this: >=20 > #1 writing a /bin/sh wrapper prepeding ${_doit} containing ulimit > commands >=20 > #2 having (someone) to build up a generic binary like nice(1) getting > limit-parameters by commandline before execve'ing the final command, e.g.= =20 >=20 > limitsh -Hv 20480 -Sv 10240 -n 300 -c command args >=20 > Problem: shells shoud implement "-c command args" and ulimit uses -c for > coredumpsize in 512byte blocks. To get around this: -Hc and -Sc are=20 > hard/soft limits to corefilesize, a single "-c" is always the > command-string like in sh(1)=20 >=20 > Any ideas? Did I miss something? >=20 You might be able to do this by using the ${name}_program rc(8) variable. For example (untested): syslogd_program=3D"/usr/bin/ulimit [ulimit_args] /usr/sbin/syslogd" syslogd_flags=3D"[...]" Glen --jq0ap7NbKX2Kqbes Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJRfwwDAAoJEFJPDDeguUajKsEH/31TSJMwo8tXIVLc7tJyTqIP 7nu312SfwY/OHxnL+ienXFGmRcJmZjxQaFMrq+4JaJUDuHRlS3wJbENY3ivoB+YM iLWt0ote0kN/kh0tZM0tYMoXCKwkEZjakbhwPt/46zRuvRwO0UJwbvBBprSBgXvQ 26FIUqtrMBoXg8UKRYgyah7tR8o/lICG5VF10T4s8V4gj5uacC7vAY5ewHIXlXln 9rYyFZZ6HztYBSyxrsgiXirHpvHVahijw5fj4lPWi16oysvi7n87g00eNRk3KDLn jZkk3iriD7uqfI6+qu5oUUm7FTUfqhLcMjqot8LyRjvbLsjmjPgxgpe3mJXyTiQ= =zd1z -----END PGP SIGNATURE----- --jq0ap7NbKX2Kqbes-- From owner-freebsd-rc@FreeBSD.ORG Sat May 4 11:44:04 2013 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5D406F6A for ; Sat, 4 May 2013 11:44:04 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ia0-x232.google.com (mail-ia0-x232.google.com [IPv6:2607:f8b0:4001:c02::232]) by mx1.freebsd.org (Postfix) with ESMTP id 3820914DE for ; Sat, 4 May 2013 11:44:04 +0000 (UTC) Received: by mail-ia0-f178.google.com with SMTP id t29so2022971iag.37 for ; Sat, 04 May 2013 04:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:from:date:message-id:subject:to :content-type; bh=mjC56wbLmx40Vhz4LeaxzNRyiXXUCn4oU80NP4BiytE=; b=CvtjEik/kMVqCx0LONOGGsK5wiy2Y9uBjhPCqANAb+8rzAy/vwbNYn2MBhfjNgq4z9 l9R1MrWLUCE38QoTR6LFnbrl9m/iVBO9UtnjD6FgHmGozM1QPQ7b/NMGppB4U4cGzy8Z MVnOc6fVOS9EcgXHDSlpLPBr4aBrhW8f6HUI/LpRGTzsBVybBHFoktfnQ0/acXJQ4SHJ ueY6Nzpo0FaEb2Qz9xl/I0AepO+bcNo24HxbdmVb531chTZzEhkKeWf5feuswsKJxUV8 TCuBZIMXb304nKNnSljwbPHTROfIMl2nnXZ+YFPVsEQ94p8lMiGWTMaQIyencOqlZwj+ 7CYw== X-Received: by 10.50.108.104 with SMTP id hj8mr420985igb.62.1367657105765; Sat, 04 May 2013 01:45:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.58.52 with HTTP; Sat, 4 May 2013 01:44:35 -0700 (PDT) From: Chris Rees Date: Sat, 4 May 2013 09:44:35 +0100 Message-ID: Subject: rc style guide To: "freebsd-rc@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 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: Sat, 04 May 2013 11:44:04 -0000 Hi all, Since writing ports-mgmt/rclint with what I figure are sane defaults, I've come across some differences between general usage in ports and the "official" style guide. I'd like to propose the following modifications: 1. Stop recommending using ${name}; it is inconsistent because although you can do something like: start_precmd=${name}_prestart You then *can't* do: ${name}_prestart() { It's also very slightly slower (though of course this is a tiny effect). 2. Move load_rc_config directly below name and rcvar; name=dummy rcvar=dummy_enable load_rc_config dummy 3. Remove the style recommendation on quoting variable values given as expressions; # OK dummy_msg="Nothing started." # Not OK : ${dummy_msg="Nothing started."} # OK : ${dummy_msg=Nothing started.} # [which is preferable to most people?? Comments please] start_cmd=dummy_start start_cmd="dummy_start" There being no objections, I'm going to put these recommendations into the style guide, and enforce them using rclint. [most of this is ports stuff really] http://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/rcng-dummy.html http://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/rcng-confdummy.html Chris From owner-freebsd-rc@FreeBSD.ORG Sat May 4 12:59:02 2013 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4AF4225E; Sat, 4 May 2013 12:59:02 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::232]) by mx1.freebsd.org (Postfix) with ESMTP id 0BDD2193B; Sat, 4 May 2013 12:59:02 +0000 (UTC) Received: by mail-ie0-f178.google.com with SMTP id b11so2699252iee.37 for ; Sat, 04 May 2013 05:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=FKWXHIucZviFSQsFITYMxA6cNZ1GkJHKkefh4Z0daqE=; b=fMPZuIfAl0QnQ0PjkzubsqereEKNv/3t9AbDLpOp6jLEahMLrVLwXacIw4CWs1184J 70mH8lVt5MGDikMNJ0o0KMBe2PnyKc1uYC5Y0iDLFcdQicaUPoGWeC/vEJ1SCSIQoHj1 yl1N3End0F0MXcS4gyTPa2Y+oHtqmo5zgKLwiD6v/oR/XYC45x9AH4Yvu6ncDaNQEoNT FLt0MaQnVIXKP1+1gKbL1YvC1+XpJh9Lv6SDeiPpSyW0YUZYl45eVDKGf7cB0Sb8ouSw MAse30UFTggMibjWSJLL4c1XFgK+zyiWtSIkXA9gfKJiCXkJsH3oFh4ALs9xOSG9hpWT oZ9Q== X-Received: by 10.50.42.165 with SMTP id p5mr615089igl.75.1367672341795; Sat, 04 May 2013 05:59:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.58.52 with HTTP; Sat, 4 May 2013 05:58:31 -0700 (PDT) In-Reply-To: References: <20121118.150935.240651183336258002.hrs@allbsd.org> <20130123.061642.1790268617280808873.hrs@allbsd.org> From: Chris Rees Date: Sat, 4 May 2013 13:58:31 +0100 Message-ID: Subject: Re: mountlate being too mount-happy To: Hiroki Sato Content-Type: text/plain; charset=ISO-8859-1 Cc: Mateusz Guzik , "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: Sat, 04 May 2013 12:59:02 -0000 On 3 March 2013 11:05, Chris Rees wrote: > On 22 January 2013 21:30, Chris Rees wrote: >> On 22 January 2013 21:16, Hiroki Sato wrote: >>> Chris Rees wrote >>> in : >>> >>> ut> [dragging it up again!] >>> ut> >>> ut> On 18 November 2012 14:28, Chris Rees wrote: >>> ut> > On 18 November 2012 06:09, Hiroki Sato wrote: >>> ut> >> Mateusz Guzik wrote >>> ut> >> in <20121118002245.GB15055@dft-labs.eu>: >>> ut> >> >>> ut> >> mj> On Sun, Nov 18, 2012 at 07:43:25AM +0900, Hiroki Sato wrote: >>> ut> >> mj> > Chris Rees wrote >>> ut> >> mj> > in < >>> ut> CADLo839wqzAPenuQDOVpQ74yjCMkPQNceKpvs_N9XNwMLrkC1A@mail.gmail.com>: >>> ut> >> mj> > >>> ut> >> mj> > ut> On 2 November 2012 14:21, Eitan Adler >>> ut> wrote: >>> ut> >> mj> > ut> > On 2 November 2012 09:56, Chris Rees >>> ut> wrote: >>> ut> >> mj> > ut> >> I'll take a look. >>> ut> >> mj> > ut> > >>> ut> >> mj> > ut> > untested: >>> ut> >> mj> > ut> >>> ut> >> mj> > ut> Based on Eitan's patch, I've tested this one, and documented >>> ut> it in mount(8) too: >>> ut> >> mj> > ut> >>> ut> >> mj> > ut> http://www.bayofrum.net/~crees/patches/mountonlylate.diff >>> ut> >> mj> > ut> >>> ut> >> mj> > ut> Does anyone have any suggestions/objections/urge to approve it? >>> ut> >> mj> > >>> ut> >> mj> > Is the original problem due to backgrounding of NFS mount only? If >>> ut> >> mj> > so, implementing prevention of duplicate invocation into mount(8) >>> ut> >> mj> > would be more reasonable, I think. >>> ut> >> mj> > >>> ut> >> mj> >>> ut> >> mj> We have 2 distinct scripts that try to mount same set of filesystems. >>> ut> >> mj> I think this is the real bug here and proposed patches makes it go >>> ut> away in >>> ut> >> mj> an IMHO acceptable way. >>> ut> >> >>> ut> >> I just wanted to make sure if the case is limited to background NFS >>> ut> >> mount or not. >>> ut> >> >>> ut> >> rc.d/mountlate just tries to mount the filesystems that are not >>> ut> >> mounted yet at that time in addition to the "late" ones, not always >>> ut> >> to mount the same set twice. If it is a bug, it is better to simply >>> ut> >> fix -l to exclude not-yet-mounted ones without "late" keyword than >>> ut> >> adding another option. >>> ut> > >>> ut> > I don't think it's a bug as such-- -l option is clearly labelled in >>> ut> > the manpage (emphasis mine): >>> ut> > >>> ut> > When used in conjunction with the -a option, *also* mount those >>> ut> > file systems which are marked as ``late''. >>> ut> > >>> ut> > I think that for POLA and to avoid changing behaviour of an option >>> ut> > that's been there a long time we need the -L option. >>> ut> > >>> ut> > I disagree with Mateusz here-- split operations in rc makes two >>> ut> > scripts necessary; mount and mountlate are two separate operations, >>> ut> > done at different times. >>> ut> >>> ut> Hiroki-san, do you still believe that changing the behaviour of -l is the >>> ut> correct way to go, rather than add a -L option for only late filesystems? >>> ut> (mount -la currently mounts *all* filesystems, you suggested to change to >>> ut> just late). >>> ut> >>> ut> I'd like to fix this, but I want to make sure you're happy with the >>> ut> solution. >>> >>> Sorry for being unresponsive. Can you give me a couple of days to >>> double-check the behavior? >> >> That'd be fantastic, thank you. >> > > Ping? Can anyone please review/approve this patch for me? http://www.bayofrum.net/~crees/patches/mountonlylate.diff Chris From owner-freebsd-rc@FreeBSD.ORG Sat May 4 13:30:40 2013 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 26CF5653; Sat, 4 May 2013 13:30:40 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id A04381B43; Sat, 4 May 2013 13:30:36 +0000 (UTC) Received: from alph.d.allbsd.org (p2175-ipbf701funabasi.chiba.ocn.ne.jp [122.25.209.175]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r44DUCS7048787 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 May 2013 22:30:22 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r44DUANZ009626; Sat, 4 May 2013 22:30:12 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sat, 04 May 2013 22:30:00 +0900 (JST) Message-Id: <20130504.223000.922408513774825970.hrs@allbsd.org> To: utisoft@gmail.com Subject: Re: mountlate being too mount-happy From: Hiroki Sato In-Reply-To: References: X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sat_May__4_22_30_00_2013_533)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sat, 04 May 2013 22:30:23 +0900 (JST) X-Spam-Status: No, score=-94.5 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,RCVD_IN_PBL,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: mjguzik@gmail.com, freebsd-rc@FreeBSD.org, mjg@FreeBSD.org 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: Sat, 04 May 2013 13:30:40 -0000 ----Security_Multipart(Sat_May__4_22_30_00_2013_533)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Chris Rees wrote in : ut> > Ping? ut> ut> Can anyone please review/approve this patch for me? ut> ut> http://www.bayofrum.net/~crees/patches/mountonlylate.diff Sorry, I thought I sent a reply to this but it wan't actually :( I double-checked the possible scenatios and now agree with preventing the duplicate mount by adding the -L option. This patch looks good to me. Please go ahead. -- Hiroki ----Security_Multipart(Sat_May__4_22_30_00_2013_533)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlGFDVgACgkQTyzT2CeTzy2etgCguco3JQ7xNRp897odXLXhTkV2 TjsAoLF3pYZYBLyVnhHPMHjwAkSLg0vF =nFpH -----END PGP SIGNATURE----- ----Security_Multipart(Sat_May__4_22_30_00_2013_533)----