From owner-freebsd-rc@FreeBSD.ORG Mon Apr 12 11:07:08 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 C03C1106566C for ; Mon, 12 Apr 2010 11:07:08 +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 AD79E8FC27 for ; Mon, 12 Apr 2010 11:07:08 +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 o3CB789x042551 for ; Mon, 12 Apr 2010 11:07:08 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3CB782s042549 for freebsd-rc@FreeBSD.org; Mon, 12 Apr 2010 11:07:08 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 Apr 2010 11:07:08 GMT Message-Id: <201004121107.o3CB782s042549@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, 12 Apr 2010 11:07:08 -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/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] [patch] Making rc.firewall (workstation) IPv6 awa o conf/137629 rc [rc] background_dhclient rc.conf option causing double o conf/137470 rc [PATCH] /etc/rc.d/mdconfig2 : prioritize cli parameter o conf/137271 rc [rc] Cannot update /etc/host.conf when root filesystem 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/130414 rc [patch] rc services started with onestart are not stop o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o conf/127917 rc [patch] dumpon rejects on start with physmem>swap even 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/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 79 problems total. From owner-freebsd-rc@FreeBSD.ORG Tue Apr 13 16:59:23 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 9003E1065673; Tue, 13 Apr 2010 16:59:23 +0000 (UTC) (envelope-from smyru@heron.pl) Received: from sys.heron.com.pl (mail.heron.pl [89.174.255.19]) by mx1.freebsd.org (Postfix) with ESMTP id 4EE968FC08; Tue, 13 Apr 2010 16:59:22 +0000 (UTC) Received: from [127.0.0.1] (helo=poczta.heron.pl) by sys.heron.com.pl with esmtp (Exim 4.70) (envelope-from ) id 1O1jIa-000HEc-TO; Tue, 13 Apr 2010 18:49:17 +0200 From: smyru@heron.pl To: dougb@FreeBSD.org,freebsd-rc@FreeBSD.org Date: Tue, 13 Apr 2010 18:49:16 +0200 Message-Id: <20100413164452.M19459@heron.pl> In-Reply-To: <201004092358.o39NwXVE012127@freefall.freebsd.org> References: <201004092358.o39NwXVE012127@freefall.freebsd.org> X-Mailer: WebMail at HERON 2.52 20060502 X-OriginatingIP: 78.8.247.176 (smyru) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Cc: bug-followup@FreeBSD.org Subject: Re: conf/145530: [rc.d] ntpdate(8): ntpdate rc needs wpa_supplicant to go online 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, 13 Apr 2010 16:59:23 -0000 Please note that this report is primarily about ntpdate needing a working Internet connection, and not complain about the order of rc's. Closing it does not make the original problem go away. I pointed at the RC order since it was a known workaround. I am open for discussion what would be the proper way to fix the problem. Best regards, -- Piotr Smyrak piotr.smyrak@heron.pl From owner-freebsd-rc@FreeBSD.ORG Wed Apr 14 20:18:04 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 68056106564A for ; Wed, 14 Apr 2010 20:18:04 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 136508FC1A for ; Wed, 14 Apr 2010 20:18:03 +0000 (UTC) Received: (qmail 31271 invoked by uid 399); 14 Apr 2010 20:18:02 -0000 Received: from localhost (HELO ?192.168.0.145?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 14 Apr 2010 20:18:02 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Date: Wed, 14 Apr 2010 13:18:00 -0700 (PDT) From: Doug Barton To: freebsd-rc@FreeBSD.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: Outlook -- Not just for spreading viruses anymore! X-OpenPGP-Key-ID: 0xD5B2F0FB Organization: http://SupersetSolutions.com/ OpenPGP: id=1A1ABC84 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Dominic Fandrey Subject: Trivial PR, fix shutdown of rc services started with onestart (fwd) 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: Wed, 14 Apr 2010 20:18:04 -0000 This issue has come up several times in the past, and previously I've been opposed to making changes since I don't regard typing "onestop" an overwhelming burden. :) However there is a reasonable argument to be made for having things work when the system is shut down. I'm not sure the patch in the PR is right (mostly for lack of examination or testing), but I'm wondering what people think about the general idea of having the shutdown action ignore whether _enable is on? Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso ---------- Forwarded message ---------- From: Dominic Fandrey To: freebsd-current@freebsd.org Date: Sat, 10 Apr 2010 02:33:35 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-GB; rv:1.9.1.9) Gecko/20100331 Thunderbird/3.0.4 Subject: Trivial PR, fix shutdown of rc services started with onestart This morning I took a look at my outstanding PRs. There is a PR I consider old and trivial: This one proposes a change that always treats rc script execution of active services as if _enable="YES" was set. This ensures, among other things, a clean shutdown procedure for services started with onestart: http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/130414 Regards -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-rc@FreeBSD.ORG Wed Apr 14 20:34:00 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 4A0F9106568E; Wed, 14 Apr 2010 20:34:00 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id EDB128FC2E; Wed, 14 Apr 2010 20:33:59 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id o3EKWc74005668; Wed, 14 Apr 2010 15:32:38 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id o3EKWbuD005667; Wed, 14 Apr 2010 15:32:37 -0500 (CDT) (envelope-from brooks) Date: Wed, 14 Apr 2010 15:32:37 -0500 From: Brooks Davis To: Doug Barton Message-ID: <20100414203237.GA5468@lor.one-eyed-alien.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Wed, 14 Apr 2010 15:32:38 -0500 (CDT) Cc: Dominic Fandrey , freebsd-rc@freebsd.org Subject: Re: Trivial PR, fix shutdown of rc services started with onestart (fwd) 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: Wed, 14 Apr 2010 20:34:00 -0000 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 14, 2010 at 01:18:00PM -0700, Doug Barton wrote: > This issue has come up several times in the past, and previously I've bee= n=20 > opposed to making changes since I don't regard typing "onestop" an=20 > overwhelming burden. :) However there is a reasonable argument to be mad= e=20 > for having things work when the system is shut down. >=20 > I'm not sure the patch in the PR is right (mostly for lack of examination= =20 > or testing), but I'm wondering what people think about the general idea o= f=20 > having the shutdown action ignore whether _enable is on? I think it's basically acceptable. I get bit by this too often and I can't think of a scenario where it would do the wrong thing without some pretty serious gyrations on the administrator's part. -- Brooks >=20 > Doug >=20 > --=20 >=20 > Improve the effectiveness of your Internet presence with > a domain name makeover! http://SupersetSolutions.com/ >=20 > Computers are useless. They can only give you answers. > -- Pablo Picasso >=20 >=20 > ---------- Forwarded message ---------- > From: Dominic Fandrey > To: freebsd-current@freebsd.org > Date: Sat, 10 Apr 2010 02:33:35 > User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-GB; > rv:1.9.1.9) Gecko/20100331 Thunderbird/3.0.4 > Subject: Trivial PR, fix shutdown of rc services started with onestart >=20 > This morning I took a look at my outstanding PRs. There > is a PR I consider old and trivial: >=20 > This one proposes a change that always treats rc script execution > of active services as if _enable=3D"YES" was set. > This ensures, among other things, a clean shutdown procedure for > services started with onestart: > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dconf/130414 >=20 > Regards >=20 > --=20 > A: Because it fouls the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing on usenet and in e-mail? > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >=20 > _______________________________________________ > freebsd-rc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-rc > To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" >=20 --bg08WKrSYDhXBjb5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFLxiZlXY6L6fI4GtQRAhEBAJ9TJv4vJH//53Oz83jIlgyqewFI2ACfY7e3 xRlN8gMQiMJVUOX8ZuyxXfc= =o2To -----END PGP SIGNATURE----- --bg08WKrSYDhXBjb5-- From owner-freebsd-rc@FreeBSD.ORG Wed Apr 14 21:33:46 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 7044E1065672 for ; Wed, 14 Apr 2010 21:33:46 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.freebsd.org (Postfix) with ESMTP id 30A6E8FC0A for ; Wed, 14 Apr 2010 21:33:45 +0000 (UTC) Received: from mobileKamikaze.norad (unknown [109.250.180.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 2D91B8A1AD1; Wed, 14 Apr 2010 23:06:24 +0200 (CEST) Message-ID: <4BC62E4C.2060700@bsdforen.de> Date: Wed, 14 Apr 2010 23:06:20 +0200 From: Dominic Fandrey User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-GB; rv:1.9.1.9) Gecko/20100331 Thunderbird/3.0.4 MIME-Version: 1.0 To: Doug Barton References: In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: Trivial PR, fix shutdown of rc services started with onestart (fwd) 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: Wed, 14 Apr 2010 21:33:46 -0000 On 14/04/2010 22:18, Doug Barton wrote: > This issue has come up several times in the past, and previously I've > been opposed to making changes since I don't regard typing "onestop" an > overwhelming burden. :) However there is a reasonable argument to be > made for having things work when the system is shut down. Think of this like a laptop user. You've got to leave quickly, so you press the power button. 10 minutes later you power back on and want to log back into VPN. Darn, you forgot to log out and now you've got to wait for for another 20 minutes, before your old session times out and you're permitted back in. There's a good reason stop_cmds normally do more than 'kill $pid'. And the results of not executing them can be much more dire than having to wait for a 30 minutes time out to complete (if you've deal with fuse, severe data loss can be the result). Also, do you keep track of what you stared if your laptop is running for a couple of days non-stop? Did you start that PostgreSQL DB? Did you start MySQL? Did you start Apache? Tor? Privoxy? ... Is it really your job to remember? > I'm not sure the patch in the PR is right (mostly for lack of > examination or testing), but I'm wondering what people think about the > general idea of having the shutdown action ignore whether _enable is on? I'm running with variations of this for more than a year and not once have I been able to detect unwanted side effects. However, I can assure you it has spared me a lot of problems. Regards -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? From owner-freebsd-rc@FreeBSD.ORG Wed Apr 14 22:43:35 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 F118C106566B; Wed, 14 Apr 2010 22:43:35 +0000 (UTC) (envelope-from smyru@heron.pl) Received: from sys.heron.com.pl (mail.heron.pl [89.174.255.19]) by mx1.freebsd.org (Postfix) with ESMTP id AC22D8FC22; Wed, 14 Apr 2010 22:43:35 +0000 (UTC) Received: from [127.0.0.1] (helo=poczta.heron.pl) by sys.heron.com.pl with esmtp (Exim 4.70) (envelope-from ) id 1O2BIw-000GTa-0t; Thu, 15 Apr 2010 00:43:30 +0200 From: smyru@heron.pl To: dougb@FreeBSD.org,freebsd-rc@FreeBSD.org Date: Thu, 15 Apr 2010 00:43:30 +0200 Message-Id: <20100413202145.M96857@heron.pl> In-Reply-To: <201004092358.o39NwXVE012127@freefall.freebsd.org> References: <201004092358.o39NwXVE012127@freefall.freebsd.org> X-Mailer: WebMail at HERON 2.52 20060502 X-OriginatingIP: 78.8.247.176 (smyru) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=OPENWEBMAIL_ATT_0.300966034268157" Cc: Subject: Re: conf/145530: [rc.d] ntpdate(8): ntpdate rc needs wpa_supplicant to go online 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: Wed, 14 Apr 2010 22:43:36 -0000 This is a multi-part message in MIME format. ------=OPENWEBMAIL_ATT_0.300966034268157 Content-Type: text/plain; charset=iso-8859-2 Hi, Here is more detail on my particular case. The rc.conf: hostname="dsk.smyrak.com" ifconfig_re0_name="eth0" ifconfig_eth0="inet 172.16.16.1 netmask 255.255.255.0" wlans_ral0="wlan0" ifconfig_wlan0="WPA DHCP" gateway_enable="YES" accounting_enable="NO" clear_tmp_enable="YES" ftpd_enable="NO" ipv6_enable="YES" linux_enable="YES" kern_securelevel_enable="NO" moused_enable="NO" named_enable="NO" ntpdate_enable="YES" powerd_enable="YES" sendmail_enable="NONE" sshd_enable="YES" usbd_enable="YES" inetd_flags="-l" rpcbind_flags="-l" syslogd_flags="-ss" /etc/ntp.conf server ntp.task.gda.pl prefer server pl.pool.ntp.org server 0.europe.pool.ntp.org server 1.europe.pool.ntp.org server 2.europe.pool.ntp.org server 3.europe.pool.ntp.org driftfile /var/db/ntp.drift logfile /var/log/ntp.log First I blamed it on 'background_dhclient="YES"' but removing it did not help. Note there is no local name server, the host relies on the router for this, so this is one more netwerk dependency. I did some testing with RC_DEBUG yesterday. Attached the putput from dmesg. So actually the wpa script _is_ run before ntpdate, though this seems to be not enough. See the last section in log. Is it possible to make ntpdate script wait until the link is up? -- Piotr Smyrak piotr.smyrak@heron.pl ------=OPENWEBMAIL_ATT_0.300966034268157 Content-Type: text/plain; name="dmesg-short.txt" Content-Disposition: attachment; filename="dmesg-short.txt" Content-Transfer-Encoding: base64 MjUwIHdsYW4wOiBFdGhlcm5ldCBhZGRyZXNzOiAwMDowZToyZTo0OToxYzplMwoyNTEgL2V0Yy9y Yy5kL3dwYV9zdXBwbGljYW50OiBERUJVRzogcGlkIGZpbGUgKC92YXIvcnVuL3dwYV9zdXBwbGlj YW50L3dsYW4wLnBpZCk6IG5vdCByZWFkYWJsZS4KMjUyIC9ldGMvcmMuZC93cGFfc3VwcGxpY2Fu dDogREVCVUc6IGxvYWRfa2xkOiB3bGFuX3dlcCBrZXJuZWwgbW9kdWxlIGFscmVhZHkgbG9hZGVk LgoyNTMgU3RhcnRpbmcgd3BhX3N1cHBsaWNhbnQuCjI1NCAvZXRjL3JjLmQvd3BhX3N1cHBsaWNh bnQ6IERFQlVHOiBydW5fcmNfY29tbWFuZDogZG9pdDogL3Vzci9zYmluL3dwYV9zdXBwbGljYW50 IC1zIC1CIC1pIHdsYW4wIC1jIC9ldGMvd3BhX3N1cHBsaWNhbnQuY29uZiAtRCBic2QgLVAgL3Zh ci8KMjU1IC9ldGMvcmM6IERFQlVHOiBjaGVja3llc25vOiBzeW5jaHJvbm91c19kaGNsaWVudCBp cyBzZXQgdG8gTk8uCjI1NiBTdGFydGluZyBOZXR3b3JrOiBsbzAgcmFsMC4KMjU3IC9ldGMvcmM6 IERFQlVHOiBjaGVja3llc25vOiByY19zdGFydG1zZ3MgaXMgc2V0IHRvIFlFUy4KMjU4IGxvMDog ZmxhZ3M9ODA0OTxVUCxMT09QQkFDSyxSVU5OSU5HLE1VTFRJQ0FTVD4gbWV0cmljIDAgbXR1IDE2 Mzg0CjI1OSAgICBvcHRpb25zPTM8UlhDU1VNLFRYQ1NVTT4KMjYwICAgIGluZXQgMTI3LjAuMC4x IG5ldG1hc2sgMHhmZjAwMDAwMAoyNjEgcmFsMDogZmxhZ3M9ODgwMjxCUk9BRENBU1QsU0lNUExF WCxNVUxUSUNBU1Q+IG1ldHJpYyAwIG10dSAyMjkwCjI2MiAgICBldGhlciAwMDowZToyZTo0OTox YzplMwoyNjMgICAgbWVkaWE6IElFRUUgODAyLjExIFdpcmVsZXNzIEV0aGVybmV0IGF1dG9zZWxl Y3QgKGF1dG9zZWxlY3QpCjI2NCAgICBzdGF0dXM6IG5vIGNhcnJpZXIKWy4uLl0KNDc2IC9ldGMv cmM6IERFQlVHOiBjaGVja3llc25vOiBuYW1lZF9lbmFibGUgaXMgc2V0IHRvIE5PLgo0NzcgL2V0 Yy9yYzogREVCVUc6IGNoZWNreWVzbm86IG50cGRhdGVfZW5hYmxlIGlzIHNldCB0byBZRVMuCjQ3 OCAvZXRjL3JjOiBERUJVRzogcnVuX3JjX2NvbW1hbmQ6IGRvaXQ6IG50cGRhdGVfc3RhcnQKNDc5 IFNldHRpbmcgZGF0ZSB2aWEgbnRwLgo0ODAgRXJyb3IgOiBob3N0bmFtZSBub3Igc2Vydm5hbWUg cHJvdmlkZWQsIG9yIG5vdCBrbm93bgo0ODEgMTAgQXByIDEwOjI5OjU5CjQ4MiBudHBkYXRlWzEw MjVdOiBjYW4ndCBmaW5kIGhvc3QgbnRwLnRhc2suZ2RhLnBsCjQ4MyAKNDg0IEVycm9yIDogaG9z dG5hbWUgbm9yIHNlcnZuYW1lIHByb3ZpZGVkLCBvciBub3Qga25vd24KNDg1IDEwIEFwciAxMDoy OTo1OQo0ODYgbnRwZGF0ZVsxMDI1XTogY2FuJ3QgZmluZCBob3N0IHBsLnBvb2wubnRwLm9yZwo0 ODcgCjQ4OCBFcnJvciA6IGhvc3RuYW1lIG5vciBzZXJ2bmFtZSBwcm92aWRlZCwgb3Igbm90IGtu b3duCjQ4OSAxMCBBcHIgMTA6Mjk6NTkKNDkwIG50cGRhdGVbMTAyNV06IGNhbid0IGZpbmQgaG9z dCAwLmV1cm9wZS5wb29sLm50cC5vcmcKNDkxIAo0OTIgRXJyb3IgOiBob3N0bmFtZSBub3Igc2Vy dm5hbWUgcHJvdmlkZWQsIG9yIG5vdCBrbm93bgo0OTMgMTAgQXByIDEwOjI5OjU5CjQ5NCBudHBk YXRlWzEwMjVdOiBjYW4ndCBmaW5kIGhvc3QgMS5ldXJvcGUucG9vbC5udHAub3JnCjQ5NSAKNDk2 IEVycm9yIDogaG9zdG5hbWUgbm9yIHNlcnZuYW1lIHByb3ZpZGVkLCBvciBub3Qga25vd24KNDk3 IDEwIEFwciAxMDoyOTo1OQo0OTggbnRwZGF0ZVsxMDI1XTogY2FuJ3QgZmluZCBob3N0IDIuZXVy b3BlLnBvb2wubnRwLm9yZwo0OTkgCjUwMCBFcnJvciA6IGhvc3RuYW1lIG5vciBzZXJ2bmFtZSBw cm92aWRlZCwgb3Igbm90IGtub3duCjUwMSAxMCBBcHIgMTA6Mjk6NTkKNTAyIG50cGRhdGVbMTAy NV06IGNhbid0IGZpbmQgaG9zdCAzLmV1cm9wZS5wb29sLm50cC5vcmcKNTAzIAo1MDQgMTAgQXBy IDEwOjI5OjU5CjUwNSBudHBkYXRlWzEwMjVdOiBubyBzZXJ2ZXJzIGNhbiBiZSB1c2VkLCBleGl0 aW5nClsuLi5dCjU4MyB3bGFuMDogbGluayBzdGF0ZSBjaGFuZ2VkIHRvIFVQCjU4NCByYWwwOiBu ZWVkIG11bHRpY2FzdCB1cGRhdGUgY2FsbGJhY2sKNTg1IHJhbDA6IG5lZWQgbXVsdGljYXN0IHVw ZGF0ZSBjYWxsYmFjawo1ODYgcmFsMDogbmVlZCBtdWx0aWNhc3QgdXBkYXRlIGNhbGxiYWNr ------=OPENWEBMAIL_ATT_0.300966034268157-- From owner-freebsd-rc@FreeBSD.ORG Thu Apr 15 08:28:08 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 4A7F8106566B for ; Thu, 15 Apr 2010 08:28:08 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id B2A1B8FC08 for ; Thu, 15 Apr 2010 08:28:07 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id o3F8S2oj097344 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Thu, 15 Apr 2010 09:28:02 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <4BC6CE12.7020305@infracaninophile.co.uk> Date: Thu, 15 Apr 2010 09:28:02 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-rc@freebsd.org References: <4BC62E4C.2060700@bsdforen.de> In-Reply-To: <4BC62E4C.2060700@bsdforen.de> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.96 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, SPF_FAIL autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on happy-idiot-talk.infracaninophile.co.uk Subject: Re: Trivial PR, fix shutdown of rc services started with onestart (fwd) 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, 15 Apr 2010 08:28:08 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 14/04/2010 22:06:20, Dominic Fandrey wrote: > I'm running with variations of this for more than a year and not once > have I been able to detect unwanted side effects. > However, I can assure you it has spared me a lot of problems. There were some rc scrips in /etc/rc.d that always did the 'start' action no matter what argument they were called with. I think all of those have been fixed to recognize a 'stop' argument now, but whether this also applies to a 'onestop' I can't tell. /etc/rc.d/tmp is an example -- notice that the script action isn't encapsulated as a tmp_start function. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvGzhIACgkQ8Mjk52CukIwljQCfWO2i5x17ZDCrUlgs9SbHrLCb I4UAn16HSwcxEUSfJV3ZUEHWkvfzIWT0 =WTPE -----END PGP SIGNATURE----- From owner-freebsd-rc@FreeBSD.ORG Thu Apr 15 08:58:17 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 D2EE7106566B for ; Thu, 15 Apr 2010 08:58:17 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.freebsd.org (Postfix) with ESMTP id 945218FC16 for ; Thu, 15 Apr 2010 08:58:17 +0000 (UTC) Received: from mobileKamikaze.norad (unknown [88.130.197.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id EC20B8A1AE6 for ; Thu, 15 Apr 2010 10:58:15 +0200 (CEST) Message-ID: <4BC6D526.2090904@bsdforen.de> Date: Thu, 15 Apr 2010 10:58:14 +0200 From: Dominic Fandrey User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-GB; rv:1.9.1.9) Gecko/20100331 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-rc@FreeBSD.org References: In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: Trivial PR, fix shutdown of rc services started with onestart (fwd) 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, 15 Apr 2010 08:58:17 -0000 I'm replying to http://docs.freebsd.org/cgi/mid.cgi?4BC6CE12.7020305 which was not CCed to me. I'm not on freebsd-rc, so I'd prefer to be. From: Matthew Seaman > On 14/04/2010 22:06:20, Dominic Fandrey wrote: >> I'm running with variations of this for more than a year and not once >> have I been able to detect unwanted side effects. >> However, I can assure you it has spared me a lot of problems. > > There were some rc scrips in /etc/rc.d that always did the 'start' > action no matter what argument they were called with. I think all of > those have been fixed to recognize a 'stop' argument now, but whether > this also applies to a 'onestop' I can't tell. /etc/rc.d/tmp is an > example -- notice that the script action isn't encapsulated as a > tmp_start function. The "one" is dealt with by rc.subr, it's not only not necessary to deal with this in the rc-scripts, I think they're not even supposed to know how they were called. Of course they can still find out if they read $1 instead of relying on the rc-magic. I can imagine no legitimate use case for this, though. -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? From owner-freebsd-rc@FreeBSD.ORG Thu Apr 15 09:10:42 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 0C3A7106566B for ; Thu, 15 Apr 2010 09:10:42 +0000 (UTC) (envelope-from xfb52@dial.pipex.com) Received: from mk-outboundfilter-6.mail.uk.tiscali.com (mk-outboundfilter-6.mail.uk.tiscali.com [212.74.114.14]) by mx1.freebsd.org (Postfix) with ESMTP id 960BC8FC12 for ; Thu, 15 Apr 2010 09:10:41 +0000 (UTC) X-Trace: 199310628/mk-outboundfilter-6.mail.uk.tiscali.com/PIPEX/$PIPEX-INTERNET-ACCEPTED/None/80.192.24.142/None/xfb52@dial.pipex.com X-SBRS: None X-RemoteIP: 80.192.24.142 X-IP-MAIL-FROM: xfb52@dial.pipex.com X-SMTP-AUTH: xfb52@dial.pipex.com X-Originating-Country: GB/UNITED KINGDOM X-MUA: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.8.1.18) Gecko/20081122 SeaMonkey/1.1.13 Mnenhy/0.7.6.0 X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApEBADZyxktQwBiO/2dsb2JhbAAH2m2FDgQ X-IronPort-AV: E=Sophos;i="4.52,211,1270422000"; d="scan'208";a="199310628" X-IP-Direction: OUT Received: from cpc1-sgyl5-0-0-cust141.sgyl.cable.virginmedia.com (HELO [192.168.23.2]) ([80.192.24.142]) by smtp.pipex.tiscali.co.uk with ESMTP; 15 Apr 2010 10:00:33 +0100 Message-ID: <4BC6D5B1.3000107@dial.pipex.com> Date: Thu, 15 Apr 2010 10:00:33 +0100 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.8.1.18) Gecko/20081122 SeaMonkey/1.1.13 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: smyru@heron.pl References: <201004092358.o39NwXVE012127@freefall.freebsd.org> <20100413202145.M96857@heron.pl> In-Reply-To: <20100413202145.M96857@heron.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: conf/145530: [rc.d] ntpdate(8): ntpdate rc needs wpa_supplicant to go online 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, 15 Apr 2010 09:10:42 -0000 I don't think the attached script is quite what you want, but I use it to solve a similar problem. On my domestic network I have a gateway FreeBSD box that the entire local network sits behind, and I have the machine I use as my desktop. Both machines get switched off at least every night. Come switch on time, I don't always remember to boot the gateway first, and often got exactly this problem --- ntpdate failing because I had no external network connection. I was able to solve that by creating my own /usr/local/etc/rc.d script which runs before ntpdate and waits some amount of time for my gateway machine to come up. If I know I'm booting with no network I can just interrupt it with ^C. I'm sure that something similar would work for you. Whether such a solution is appropriate more generally I don't know but something like it should work for you, I think, without any mods being required to the base system. hth, --Alex $ egrep gateway_up /etc/rc.conf gateway_up_enable="YES" # Wait for gateway to come up gateway_up_host="192.168.23.3" In addition you can set e.g. gateway_up_external="some.domain.name" # External host we can ping gateway_up_wait=600 # wait 600s for gateway to come up gateway_up_external_wait=600 # wait 600s for external host to be available (e.g. waiting for named to start on gateway) #!/bin/sh # # $Id: gateway_up,v 1.4 2009/05/25 11:23:52 alex Exp $ # # PROVIDE: gateway_up # REQUIRE: NETWORKING syslogd named # BEFORE: ntpdate # KEYWORD: nojail . /etc/rc.subr name="gateway_up" rcvar=`set_rcvar` start_cmd="gateway_up_start" stop_cmd=":" : ${gateway_up_wait:=180} : ${gateway_up_external_wait:=180} [ ${gateway_up_wait} -lt 0 ] && gateway_up_wait=$((-${gateway_up_wait})) [ ${gateway_up_external_wait} -lt 0 ] && gateway_up_external_wait=$((-${gateway_up_external_wait})) gateway_up_start() { local external_host count echo_done if [ -z "$gateway_up_host" ]; then warn "gateway_up_host not set" return 1 fi if [ -z "$gateway_up_external" ]; then if [ -n "$ntpdate_hosts" ]; then "$gateway_up_external"="$ntpdate_hosts" elif [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then gateway_up_external=`awk ' /^server[ \t]*127.127/ {next} /^(server|peer)/ {print $2} ' < ${ntpdate_config}` else warn "gateway_up_external unset and no ntp hosts found" fi fi if ! ping -W 1 -c 1 $gateway_up_host > /dev/null 2>&1; then # Wait for gateway host a maximum of ${gateway_up_wait} seconds echo -n "Waiting (roughly) ${gateway_up_wait}s for gateway ${gateway_up_host}: " if ! ping -o -t ${gateway_up_wait} $gateway_up_host > /dev/null 2>&1; then echo "not up...continuing" return 0 fi echo "done" fi # Wait for an external host to ping for a rough maximum of # ${gateway_up_external_wait} seconds, trying each in turn # for 2 seconds if [ -z "${gateway_up_external}" ]; then echo "No gateway_up_external hosts to check" return 0 fi count=0 echo_done=0 while [ $count -lt ${gateway_up_external_wait} ]; do for external_host in ${gateway_up_external}; do count=$((count+1)) #echo checking $external_host # SIGALRM somewhere (prints "Alarm clock") sometimes # if we try -o -t 1 if ping -W 100 -c 1 $external_host > /dev/null 2>&1; then if [ $echo_done -gt 0 ]; then echo "done" fi return 0 fi if [ $count -eq 1 ]; then echo -n "Waiting (roughly) ${gateway_up_external_wait}s for external connectivity: " echo_done=1 fi #echo "sleeping" sleep 2 done done if [ $echo_done -gt 0 ]; then echo "No connectivity...continuing" fi } load_rc_config $name run_rc_command "$1" From owner-freebsd-rc@FreeBSD.ORG Thu Apr 15 21:20:04 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 1BB2B106566C for ; Thu, 15 Apr 2010 21:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0CCFB8FC16 for ; Thu, 15 Apr 2010 21:20:04 +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 o3FLK3vU089158 for ; Thu, 15 Apr 2010 21:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3FLK3SZ089156; Thu, 15 Apr 2010 21:20:03 GMT (envelope-from gnats) Date: Thu, 15 Apr 2010 21:20:03 GMT Message-Id: <201004152120.o3FLK3SZ089156@freefall.freebsd.org> To: freebsd-rc@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: conf/130414: commit references a PR X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service 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, 15 Apr 2010 21:20:04 -0000 The following reply was made to PR conf/130414; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: conf/130414: commit references a PR Date: Thu, 15 Apr 2010 21:18:37 +0000 (UTC) Author: dougb Date: Thu Apr 15 21:18:24 2010 New Revision: 206686 URL: http://svn.freebsd.org/changeset/base/206686 Log: If a service is running, make 'stop' work even if ${name}_enable is not set. PR: conf/130414 Submitted by: Dominic Fandrey Reviewed by: freebsd-rc@ Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Thu Apr 15 20:48:57 2010 (r206685) +++ head/etc/rc.subr Thu Apr 15 21:18:24 2010 (r206686) @@ -646,12 +646,12 @@ run_rc_command() if [ "$_elem" != "$rc_arg" ]; then continue fi - # if ${rcvar} is set, and $1 is not - # "rcvar", then run + # if ${rcvar} is set, $1 is not "rcvar" + # and ${rc_pid} is not set, then run # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then return 0 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-rc@FreeBSD.ORG Thu Apr 15 21:21:29 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 D31AD106566C; Thu, 15 Apr 2010 21:21:29 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AAAA98FC25; Thu, 15 Apr 2010 21:21:29 +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 o3FLLTCm097114; Thu, 15 Apr 2010 21:21:29 GMT (envelope-from dougb@freefall.freebsd.org) Received: (from dougb@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3FLLTdG097110; Thu, 15 Apr 2010 21:21:29 GMT (envelope-from dougb) Date: Thu, 15 Apr 2010 21:21:29 GMT Message-Id: <201004152121.o3FLLTdG097110@freefall.freebsd.org> To: kamikaze@bsdforen.de, dougb@FreeBSD.org, freebsd-rc@FreeBSD.org, dougb@FreeBSD.org From: dougb@FreeBSD.org Cc: Subject: Re: conf/130414: [patch] rc services started with onestart are not stopped upon shutdown 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, 15 Apr 2010 21:21:29 -0000 Synopsis: [patch] rc services started with onestart are not stopped upon shutdown State-Changed-From-To: open->patched State-Changed-By: dougb State-Changed-When: Thu Apr 15 21:20:43 UTC 2010 State-Changed-Why: The change has been committed to HEAD. I will MFC it after it has had time to settle, but ideally before 8.1-RELEASE. Responsible-Changed-From-To: freebsd-rc->dougb Responsible-Changed-By: dougb Responsible-Changed-When: Thu Apr 15 21:20:43 UTC 2010 Responsible-Changed-Why: I'll handle the MFC. http://www.freebsd.org/cgi/query-pr.cgi?pr=130414 From owner-freebsd-rc@FreeBSD.ORG Thu Apr 15 21:30:28 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 456B5106564A for ; Thu, 15 Apr 2010 21:30:28 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id E65C78FC08 for ; Thu, 15 Apr 2010 21:30:27 +0000 (UTC) Received: (qmail 27885 invoked by uid 399); 15 Apr 2010 21:30:26 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 15 Apr 2010 21:30:26 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BC78571.4000808@FreeBSD.org> Date: Thu, 15 Apr 2010 14:30:25 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: Matthew Seaman References: <4BC62E4C.2060700@bsdforen.de> <4BC6CE12.7020305@infracaninophile.co.uk> In-Reply-To: <4BC6CE12.7020305@infracaninophile.co.uk> X-Enigmail-Version: 1.0.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: Trivial PR, fix shutdown of rc services started with onestart (fwd) 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, 15 Apr 2010 21:30:28 -0000 On 04/15/10 01:28, Matthew Seaman wrote: > On 14/04/2010 22:06:20, Dominic Fandrey wrote: >> I'm running with variations of this for more than a year and not once >> have I been able to detect unwanted side effects. >> However, I can assure you it has spared me a lot of problems. > > There were some rc scrips in /etc/rc.d that always did the 'start' > action no matter what argument they were called with. This change will only matter if there is an actual process that is running. For things in the base there is an _enable default in /etc/defaults/rc.conf for each item. If the user did 'onestart' or 'forcestart' to start the process/service even though _enable is NO, this change will allow it to be shut down cleanly. > I think all of > those have been fixed to recognize a 'stop' argument now, but whether > this also applies to a 'onestop' I can't tell. As someone else already answered, the 'one' or 'force' prepends are converted to internal flags for rc.subr, the argument passed to the script does not contain them. > /etc/rc.d/tmp is an > example -- notice that the script action isn't encapsulated as a > tmp_start function. That's a bug that should be fixed, but it's orthogonal to this issue. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-freebsd-rc@FreeBSD.ORG Sat Apr 17 19:28:42 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 2F6F0106566C for ; Sat, 17 Apr 2010 19:28:42 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5F6A88FC08 for ; Sat, 17 Apr 2010 19:28:40 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA20163 for ; Sat, 17 Apr 2010 22:16:31 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1O3DVH-000EWf-63 for freebsd-rc@freebsd.org; Sat, 17 Apr 2010 22:16:31 +0300 Message-ID: <4BCA090E.1040403@icyb.net.ua> Date: Sat, 17 Apr 2010 22:16:30 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: freebsd-rc@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: rc.d/root: handle filesystems with r/o support only 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: Sat, 17 Apr 2010 19:28:42 -0000 Could you please review the following patch? The idea is to not try to remount root R/W if root filesystem supports only R/O. For example, cd9660. This should make life easier for live CDs that use standard rc startup. Currently one has to either put a root fs entry into fstab (and thus guess root device name, e.g. cd0 vs acd0) or to specify root_rw_mount="NO" in rc.conf. This change attempts to guess that automatically. I think that things like ro_fs_list, in_list and is_readonly_fs could be shared with other rc scripts. E.g. see http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/116931 P.S. sorry if the code style and structure differs from conventions. --- a/etc/rc.d/root +++ b/etc/rc.d/root @@ -13,11 +13,54 @@ name="root" start_cmd="root_start" stop_cmd=":" +ro_fs_list="cd9660 udf" + +in_list() +{ + local _x _list _i + + _x=$1 + _list=$2 + for _i in ${_list}; do + [ "${_x}" = "${_i}" ] && return 0 + done + return 1 +} + +is_readonly_fs() +{ + local _arg _ret + + _arg="$1" ; shift + _ret=`mount -p | while read _dev _mp _type _rest; do + [ $_mp = "$_arg" ] || continue + echo $_type + break + done` + + if [ -z "${_ret}" ]; then + warn "root filesystem not found" + return 1 + fi + if in_list "${_ret}" "${ro_fs_list}"; then + info "read-only root filesystem type: ${_ret}" + return 0 + else + info "read-write root filesystem type: ${_ret}" + return 1 + fi +} + root_start() { # root normally must be read/write, but if this is a BOOTP NFS # diskless boot it does not have to be. # + + if is_readonly_fs '/' ; then + root_rw_mount="NO" + fi + case ${root_rw_mount} in [Nn][Oo] | '') ;; -- Andriy Gapon