From owner-freebsd-rc@FreeBSD.ORG Sun Nov 27 13:13:50 2011 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 9F6B1106564A for ; Sun, 27 Nov 2011 13:13:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D72FD8FC13 for ; Sun, 27 Nov 2011 13:13:49 +0000 (UTC) Received: from porto.starpoint.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 PAA15106 for ; Sun, 27 Nov 2011 15:13:48 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RUeYG-000KGg-3o for freebsd-rc@freebsd.org; Sun, 27 Nov 2011 15:13:48 +0200 Message-ID: <4ED2378B.2080601@FreeBSD.org> Date: Sun, 27 Nov 2011 15:13:47 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111108 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-rc@FreeBSD.org X-Enigmail-Version: undefined Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: Subject: rc.d/watchdogd: a suggestion 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, 27 Nov 2011 13:13:50 -0000 I have a suggestion to start watchdogd a little bit earlier than it is done now, and correspondingly to stop it a little bit later during shutdown: @@ -28,7 +28,8 @@ # # PROVIDE: watchdogd -# REQUIRE: DAEMON cleanvar +# REQUIRE: FILESYSTEMS syslogd cleanvar +# BEFORE: SERVERS # KEYWORD: nojail shutdown . /etc/rc.subr Not sure if it really has to be after syslogd, but I decided to keep that for POLA reasons (messages in logs). What do you think? -- Andriy Gapon From owner-freebsd-rc@FreeBSD.ORG Sun Nov 27 20:06:21 2011 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 7F5A5106566C; Sun, 27 Nov 2011 20:06:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 0CB8F14E903; Sun, 27 Nov 2011 20:06:20 +0000 (UTC) Message-ID: <4ED2983B.5050800@FreeBSD.org> Date: Sun, 27 Nov 2011 12:06:19 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Andriy Gapon References: <4ED2378B.2080601@FreeBSD.org> In-Reply-To: <4ED2378B.2080601@FreeBSD.org> X-Enigmail-Version: 1.3.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: rc.d/watchdogd: a suggestion 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, 27 Nov 2011 20:06:21 -0000 On 11/27/2011 5:13 AM, Andriy Gapon wrote: > > I have a suggestion to start watchdogd a little bit earlier than it is done now, > and correspondingly to stop it a little bit later during shutdown: I have no particular opinion on changing the timing, but you haven't said why you want to do it. > @@ -28,7 +28,8 @@ > # > > # PROVIDE: watchdogd > -# REQUIRE: DAEMON cleanvar > +# REQUIRE: FILESYSTEMS syslogd cleanvar > +# BEFORE: SERVERS Ideally base scripts should not use BEFORE. Change REQUIRE in SERVERS instead. hth, Doug -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-rc@FreeBSD.ORG Sun Nov 27 20:17:25 2011 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 D15D21065670; Sun, 27 Nov 2011 20:17:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id EFA618FC20; Sun, 27 Nov 2011 20:17:24 +0000 (UTC) Received: from porto.starpoint.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 WAA18355; Sun, 27 Nov 2011 22:17:23 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RUlAA-000KU7-Vg; Sun, 27 Nov 2011 22:17:23 +0200 Message-ID: <4ED29AD0.5060908@FreeBSD.org> Date: Sun, 27 Nov 2011 22:17:20 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111108 Thunderbird/8.0 MIME-Version: 1.0 To: Doug Barton References: <4ED2378B.2080601@FreeBSD.org> <4ED2983B.5050800@FreeBSD.org> In-Reply-To: <4ED2983B.5050800@FreeBSD.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: rc.d/watchdogd: a suggestion 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, 27 Nov 2011 20:17:25 -0000 on 27/11/2011 22:06 Doug Barton said the following: > On 11/27/2011 5:13 AM, Andriy Gapon wrote: >> >> I have a suggestion to start watchdogd a little bit earlier than it is done now, >> and correspondingly to stop it a little bit later during shutdown: > > I have no particular opinion on changing the timing, but you haven't > said why you want to do it. So that it covers a larger period of system operation. My (one time) use case for it was to prevent a situation where an exiting X server hanged the whole machine. It happened so that watchdogd was stopped before X server got killed. >> @@ -28,7 +28,8 @@ >> # >> >> # PROVIDE: watchdogd >> -# REQUIRE: DAEMON cleanvar >> +# REQUIRE: FILESYSTEMS syslogd cleanvar >> +# BEFORE: SERVERS > > Ideally base scripts should not use BEFORE. Change REQUIRE in SERVERS > instead. You mean so that SERVERS requires watchdogd? -- Andriy Gapon From owner-freebsd-rc@FreeBSD.ORG Mon Nov 28 11:07:28 2011 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 7F9FE1065689 for ; Mon, 28 Nov 2011 11:07:28 +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 6D0948FC19 for ; Mon, 28 Nov 2011 11:07:28 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pASB7SY1042901 for ; Mon, 28 Nov 2011 11:07:28 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pASB7R2g042885 for freebsd-rc@FreeBSD.org; Mon, 28 Nov 2011 11:07:27 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 Nov 2011 11:07:27 GMT Message-Id: <201111281107.pASB7R2g042885@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, 28 Nov 2011 11:07:28 -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/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/154554 rc [rc.d] [patch] statd and lockd fail to start 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/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/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/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/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 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/123119 rc [patch] rc script for ipfw does not handle IPv6 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/109272 rc [request] increase default rc shutdown timeout 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/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/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/44170 rc [patch] Add ability to run multiple pppoed(8) on start 91 problems total. From owner-freebsd-rc@FreeBSD.ORG Wed Nov 30 08:57:59 2011 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 6617D106566C; Wed, 30 Nov 2011 08:57:59 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1F8898FC13; Wed, 30 Nov 2011 08:57:59 +0000 (UTC) Received: by iakl21 with SMTP id l21so721535iak.13 for ; Wed, 30 Nov 2011 00:57:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=40w/R8RLtGLxFCXse1MCG1ANbFrQc4ZkzCYRQSP3q4U=; b=I2IcceB3HGKd9T8Mg1C8EAqfgRf4yXHmjkGplF+2gQdyJtjztIN/oj/Mtu2+stU7Vy cq3g2nV5uiz2546BzMd7Uh2yBSClJLfJau1cSuQxutUBSsEleiJH/sJXaLyVP7Kye0N3 dVqOfFxYhBVCZv1Qi/rEzHKzXEjHQ5H8okiP4= MIME-Version: 1.0 Received: by 10.42.147.72 with SMTP id m8mr1542042icv.56.1322642068150; Wed, 30 Nov 2011 00:34:28 -0800 (PST) Received: by 10.231.12.139 with HTTP; Wed, 30 Nov 2011 00:34:27 -0800 (PST) Received: by 10.231.12.139 with HTTP; Wed, 30 Nov 2011 00:34:27 -0800 (PST) In-Reply-To: References: Date: Wed, 30 Nov 2011 08:34:27 +0000 Message-ID: From: Chris Rees To: Aryeh Friedman Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-x11@freebsd.org, rc@freebsd.org Subject: Re: xdm does not work junder BETA3 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, 30 Nov 2011 08:57:59 -0000 On 29 Nov 2011 03:43, "Aryeh Friedman" wrote: > > I found the problem it never deleted the /var/run/xdm.pid on reboot Shouldn't /var/run be cleared on boot? Cc rc, sorry for cross-posting but it seems to be that kind of issue. Chris From owner-freebsd-rc@FreeBSD.ORG Wed Nov 30 10:35:13 2011 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 8F31C106564A for ; Wed, 30 Nov 2011 10:35:13 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4B51E8FC16 for ; Wed, 30 Nov 2011 10:35:12 +0000 (UTC) Received: by ggnk5 with SMTP id k5so756381ggn.13 for ; Wed, 30 Nov 2011 02:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=soLTPvk+ViQg5jlb08y424hWqtUuS8MQlvjDFoDWWbY=; b=jq1Vb5RZ4iz6swBv2zoLpCN6Bdq2dopF7d7SZhU7amPdhDH3gS4V2Dxqp3dTLncp9g UMMxRt++nXLHXhDVgDI7UzZjivLJOObU5eB++gZewPlut1LZHtg+bNqUnL4rvEe/zBzZ +gfSoMbXrOxgOyeYax18kR+653TH8qn2Q7lkU= MIME-Version: 1.0 Received: by 10.68.16.5 with SMTP id b5mr5842096pbd.95.1322647647144; Wed, 30 Nov 2011 02:07:27 -0800 (PST) Received: by 10.143.27.35 with HTTP; Wed, 30 Nov 2011 02:07:27 -0800 (PST) In-Reply-To: References: Date: Wed, 30 Nov 2011 05:07:27 -0500 Message-ID: From: Aryeh Friedman To: Chris Rees Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-x11@freebsd.org, rc@freebsd.org Subject: Re: xdm does not work junder BETA3 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, 30 Nov 2011 10:35:13 -0000 On Wed, Nov 30, 2011 at 3:34 AM, Chris Rees wrote: > > On 29 Nov 2011 03:43, "Aryeh Friedman" wrote: > > > > I found the problem it never deleted the /var/run/xdm.pid on reboot > > Shouldn't /var/run be cleared on boot? > > Cc rc, sorry for cross-posting but it seems to be that kind of issue. > > Chris > Yes in theory the machine should when it does a cold (and this includes the power/reset button) boot the machine from the moment the processor does it's very first cycle to the time I type the very first key and/or the first mouse movement as a fully logged in user (via XDM) using the default XFCE4 desktop with my default configs means that the when the machine shutdown it left *ZERO* evidence that it had ever existed... in other words the default start up (POST --> bootloader --> single user mode --> xdm --> xfce4) does not need to worry about getting rid of side effects of this.... in the windows world this is done with a program by the name of "Freeze Dry".... the only problem with Freeze Dry is a) it runs on windows only (needs a disk formatted and booted with fat32), b) it requires a mirror drive with the default config to over write and then boot on the active slice and c) makes it nearly impossible to make "local" changes (actually it's primary audience is college computer [and other public computer] labs/sites that need to be able to reboot to the same config no matter what weird thing the user did).... item c is what makes it hard to use that so instead the entier start up process should never see any evidence that it is not the very first OS ever booted on this machine being booted for the first time From owner-freebsd-rc@FreeBSD.ORG Wed Nov 30 17:22:33 2011 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 27F6F1065673; Wed, 30 Nov 2011 17:22:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id AA5628FC0C; Wed, 30 Nov 2011 17:22:32 +0000 (UTC) Received: from [10.30.101.60] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pAUHGBUZ074738 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Wed, 30 Nov 2011 10:16:12 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Wed, 30 Nov 2011 10:16:06 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <00701089-9A0A-4309-8A6B-D6AF34CDEBF0@bsdimp.com> References: To: Aryeh Friedman X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Wed, 30 Nov 2011 10:16:13 -0700 (MST) Cc: freebsd-x11@freebsd.org, rc@freebsd.org, Chris Rees Subject: Re: xdm does not work junder BETA3 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, 30 Nov 2011 17:22:33 -0000 /var/run isn't ever cleared on boot. Programs are supposed to cope with = with stale .pid files, since they might have died w/o deleting it... Warner On Nov 30, 2011, at 3:07 AM, Aryeh Friedman wrote: > On Wed, Nov 30, 2011 at 3:34 AM, Chris Rees wrote: >=20 >>=20 >> On 29 Nov 2011 03:43, "Aryeh Friedman" = wrote: >>>=20 >>> I found the problem it never deleted the /var/run/xdm.pid on reboot >>=20 >> Shouldn't /var/run be cleared on boot? >>=20 >> Cc rc, sorry for cross-posting but it seems to be that kind of issue. >>=20 >> Chris >>=20 >=20 > Yes in theory the machine should when it does a cold (and this = includes the > power/reset button) boot the machine from the moment the processor = does > it's very first cycle to the time I type the very first key and/or the > first mouse movement as a fully logged in user (via XDM) using the = default > XFCE4 desktop with my default configs means that the when the machine > shutdown it left *ZERO* evidence that it had ever existed... in other = words > the default start up (POST --> bootloader --> single user mode --> xdm = --> > xfce4) does not need to worry about getting rid of side effects of = this.... > in the windows world this is done with a program by the name of = "Freeze > Dry".... the only problem with Freeze Dry is a) it runs on windows = only > (needs a disk formatted and booted with fat32), b) it requires a = mirror > drive with the default config to over write and then boot on the = active > slice and c) makes it nearly impossible to make "local" changes = (actually > it's primary audience is college computer [and other public computer] > labs/sites that need to be able to reboot to the same config no matter = what > weird thing the user did).... item c is what makes it hard to use that = so > instead the entier start up process should never see any evidence that = it > is not the very first OS ever booted on this machine being booted for = the > first time > _______________________________________________ > 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 >=20 From owner-freebsd-rc@FreeBSD.ORG Wed Nov 30 17:54:42 2011 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 0363B106564A for ; Wed, 30 Nov 2011 17:54:42 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward10.mail.yandex.net (forward10.mail.yandex.net [IPv6:2a02:6b8:0:202::5]) by mx1.freebsd.org (Postfix) with ESMTP id 1E28D8FC08 for ; Wed, 30 Nov 2011 17:54:41 +0000 (UTC) Received: from smtp8.mail.yandex.net (smtp8.mail.yandex.net [77.88.61.54]) by forward10.mail.yandex.net (Yandex) with ESMTP id 90B27102464D for ; Wed, 30 Nov 2011 21:54:39 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322675679; bh=h//fWZDod3mLj19sQQ/+gJR++8AuRae0OoXg9y8oRkU=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type; b=wbNzur4mh/Q0PyQMTi1s2BE9cG2UjvHmP2/7JRV6jI9BaI+pXml56ayhbRDbLQEQe kTwssU/PAahPh59ZtKXpMFfUVuANj/YJbrCYFaUVD4oMscFiRsfiUQznk+2a6/FxYI NoYcH3B8pnzgVxjeRZyak3ZjrKkZn1A3eXgy2hf0= Received: from smtp8.mail.yandex.net (localhost [127.0.0.1]) by smtp8.mail.yandex.net (Yandex) with ESMTP id 6E1941B603E4 for ; Wed, 30 Nov 2011 21:54:39 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322675679; bh=h//fWZDod3mLj19sQQ/+gJR++8AuRae0OoXg9y8oRkU=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type; b=wbNzur4mh/Q0PyQMTi1s2BE9cG2UjvHmP2/7JRV6jI9BaI+pXml56ayhbRDbLQEQe kTwssU/PAahPh59ZtKXpMFfUVuANj/YJbrCYFaUVD4oMscFiRsfiUQznk+2a6/FxYI NoYcH3B8pnzgVxjeRZyak3ZjrKkZn1A3eXgy2hf0= Received: from unknown (unknown [213.138.88.133]) by smtp8.mail.yandex.net (nwsmtp/Yandex) with ESMTP id scA89ZkX-sdA8se0K; Wed, 30 Nov 2011 21:54:39 +0400 X-Yandex-Spam: 1 Message-ID: <4ED66DCB.1040102@yandex.ru> Date: Wed, 30 Nov 2011 21:54:19 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111109 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-rc@FreeBSD.org X-Enigmail-Version: undefined Content-Type: multipart/mixed; boundary="------------070602010403020602090903" Cc: Subject: rc-script review request 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, 30 Nov 2011 17:54:42 -0000 This is a multi-part message in MIME format. --------------070602010403020602090903 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello. I'm planning to finish repocopy of www/zope213 this evening. Would you please review rc-script that is supplied with it [1]? I get this one from www/zope211 and minimally changed it, and as far i can tell dougb@ was the last person who touched it, so it should be ok, but i'm asking for review just for the case. I'm attached the script in question and provide the link to it for the case if mailmain will eat it. Thank you much in advance. [1] https://github.com/mexicarne/zope/blob/master/www/zope213/files/zope213.in -- Regards, Ruslan Tinderboxing kills... the drives. --------------070602010403020602090903 Content-Type: text/plain; name="zope213.in.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="zope213.in.txt" IyEvYmluL3NoCiMKIyBTdGFydHVwIHNjcmlwdCBmb3IgWm9wZSBzZXJ2ZXIuCiMKIyAkRnJl ZUJTRDogcG9ydHMvd3d3L3pvcGUyMTEvZmlsZXMvem9wZTIxMS5pbix2IDEuMyAyMDExLzA1 LzE1IDAyOjQ5OjE3IGRvdWdiIEV4cCAkCiMKIyBQUk9WSURFOiB6b3BlMjEzCiMgUkVRVUlS RTogREFFTU9OCgojIERlZmluZSB0aGVzZSB6b3BlMjEzXyogdmFyaWFibGVzIGluIG9uZSBv ZiB0aGVzZSBmaWxlczoKIyAgICAgICAvZXRjL3JjLmNvbmYKIyAgICAgICAvZXRjL3JjLmNv bmYubG9jYWwKIyAgICAgICAvZXRjL3JjLmNvbmYuZC96b3BlMjEzCiMKIyB6b3BlMjEzX2Vu YWJsZSA6IGJvb2wKIyAgIEVuYWJsZSBab3BlICgiWUVTIikgb3Igbm90ICgiTk8iLCB0aGUg ZGVmYXVsdCkuCiMKIyB6b3BlMjEzX2luc3RhbmNlcyA6IGxpc3QKIyAgIExpc3Qgb2YgZGly cyB3aXRoIFpvcGUncyBpbnN0YW5jZXMgKCIiIGJ5IGRlZmF1bHQpLgojCgouIC9ldGMvcmMu c3VicgoKbmFtZT0iem9wZTIxMyIKcmN2YXI9YHNldF9yY3ZhcmAKCnpvcGUyMTNjdGwgKCkg ewogICAgZm9yIGluc3RhbmNlIGluICR6b3BlMjEzX2luc3RhbmNlczsgZG8KCWlmIFsgLWQg JHtpbnN0YW5jZX0gXTsgdGhlbgoJCWVjaG8gLW4gIiAgWm9wZSBpbnN0YW5jZSAke2luc3Rh bmNlfSAtPiAiCgkJJHtpbnN0YW5jZX0vYmluL3pvcGVjdGwgIiQxIgoJZmkKICAgIGRvbmUK fQoKem9wZTIxM19zdGFydCAoKSB7CiAgICBlY2hvICJTdGFydGluZyBab3BlIDIuMTM6Igog ICAgem9wZTIxM2N0bCAic3RhcnQiCn0KCnpvcGUyMTNfc3RvcCAoKSB7CiAgICBlY2hvICJT dG9wcGluZyBab3BlIDIuMTM6IgogICAgem9wZTIxM2N0bCAic3RvcCIKfQoKem9wZTIxM19y ZXN0YXJ0ICgpIHsKICAgIGVjaG8gIlJlc3RhcnRpbmcgWm9wZSAyLjEzOiIKICAgIHpvcGUy MTNjdGwgInJlc3RhcnQiCn0KCiAgc3RhcnRfY21kPSJ6b3BlMjEzX3N0YXJ0IgogICBzdG9w X2NtZD0iem9wZTIxM19zdG9wIgpyZXN0YXJ0X2NtZD0iem9wZTIxM19yZXN0YXJ0IgoKbG9h ZF9yY19jb25maWcgJG5hbWUKCjogJHt6b3BlMjEzX2VuYWJsZT0iTk8ifQoKY21kPSIkMSIK WyAkIyAtZ3QgMCBdICYmIHNoaWZ0ClsgLW4gICIkKiIgXSAmJiB6b3BlMjEzX2luc3RhbmNl cz0iJCoiCgpydW5fcmNfY29tbWFuZCAiJHtjbWR9Igo= --------------070602010403020602090903-- From owner-freebsd-rc@FreeBSD.ORG Wed Nov 30 18:45:31 2011 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 D04F51065670 for ; Wed, 30 Nov 2011 18:45:31 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6716E8FC14 for ; Wed, 30 Nov 2011 18:45:31 +0000 (UTC) Received: by faak28 with SMTP id k28so1137171faa.13 for ; Wed, 30 Nov 2011 10:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=KcXDrtDO4a8xDLCOYUsn/tuzIg2/eMxL57w+J2B2mfs=; b=eYscrMciNmDWVwakeTYdK3A7Vwf/VpeBLm/JNLi2MTqi85KZs63BMpj7b3VXDTWUcC gkMiBAMY/aKEUYSXwJMjchneJ+c4No0ZsQA12O6slMcc4Djfgk2moo3pj0iszbm7NSg9 /FBX4wJQYfRaDE0yZ57XX1YTVZZIJ8HlkKmQQ= Received: by 10.180.109.106 with SMTP id hr10mr3451246wib.9.1322676943116; Wed, 30 Nov 2011 10:15:43 -0800 (PST) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.216.181.197 with HTTP; Wed, 30 Nov 2011 10:15:12 -0800 (PST) In-Reply-To: <4ED66DCB.1040102@yandex.ru> References: <4ED66DCB.1040102@yandex.ru> From: Chris Rees Date: Wed, 30 Nov 2011 18:15:12 +0000 X-Google-Sender-Auth: UyeFOs9MVa-fLi7ESP0IwncHkDk Message-ID: To: Ruslan Mahmatkhanov Content-Type: text/plain; charset=KOI8-R Cc: freebsd-rc@freebsd.org Subject: Re: rc-script review request 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, 30 Nov 2011 18:45:31 -0000 On 30 November 2011 17:54, Ruslan Mahmatkhanov wrote: > Hello. > > I'm planning to finish repocopy of www/zope213 this evening. Would you > please review rc-script that is supplied with it [1]? > > I get this one from www/zope211 and minimally changed it, and as far i > can tell dougb@ was the last person who touched it, so it should be ok, > but i'm asking for review just for the case. > > I'm attached the script in question and provide the link to it for the > case if mailmain will eat it. > > Thank you much in advance. I could get yelled at for this, but normally I'd prefer: start_cmd="${name}_start" over start_cmd="zope213_start". Chris From owner-freebsd-rc@FreeBSD.ORG Wed Nov 30 18:53:25 2011 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 C76CE106566C; Wed, 30 Nov 2011 18:53:25 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward5.mail.yandex.net (forward5.mail.yandex.net [IPv6:2a02:6b8:0:602::5]) by mx1.freebsd.org (Postfix) with ESMTP id 418A98FC18; Wed, 30 Nov 2011 18:53:25 +0000 (UTC) Received: from smtp2.mail.yandex.net (smtp2.mail.yandex.net [77.88.46.102]) by forward5.mail.yandex.net (Yandex) with ESMTP id 987C212021C8; Wed, 30 Nov 2011 22:53:23 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322679203; bh=f7qL/TV+j4iECgXTCynu4eJ3G55zu7WeQDzpwCyb7Pw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=WGUUs6gQxqeAk6cfvRGREt3A5S98lbwPwZO/VcAI4GWV+GJc3hjVDH9pRG2sMUQqx gJXRMy/EZ/UhsFj3dt/5rKXCVEyECRQW0Gc7HPMz3ap8TyyEsRXKjxvlohGLQj0X27 H9CbbIWgRIyXEHtSBOkUP3w0xDSkk7ZuEdk6i4Kk= Received: from smtp2.mail.yandex.net (localhost [127.0.0.1]) by smtp2.mail.yandex.net (Yandex) with ESMTP id EBC5BE20347; Wed, 30 Nov 2011 22:53:22 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322679203; bh=f7qL/TV+j4iECgXTCynu4eJ3G55zu7WeQDzpwCyb7Pw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=WGUUs6gQxqeAk6cfvRGREt3A5S98lbwPwZO/VcAI4GWV+GJc3hjVDH9pRG2sMUQqx gJXRMy/EZ/UhsFj3dt/5rKXCVEyECRQW0Gc7HPMz3ap8TyyEsRXKjxvlohGLQj0X27 H9CbbIWgRIyXEHtSBOkUP3w0xDSkk7ZuEdk6i4Kk= Received: from unknown (unknown [213.138.88.133]) by smtp2.mail.yandex.net (nwsmtp/Yandex) with ESMTP id rMw00QFp-rMwawg2a; Wed, 30 Nov 2011 22:53:22 +0400 X-Yandex-Spam: 1 Message-ID: <4ED67B8F.50109@yandex.ru> Date: Wed, 30 Nov 2011 22:53:03 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111109 Thunderbird/8.0 MIME-Version: 1.0 To: Chris Rees References: <4ED66DCB.1040102@yandex.ru> In-Reply-To: X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: rc-script review request 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, 30 Nov 2011 18:53:25 -0000 Chris Rees wrote on 30.11.2011 22:15: > On 30 November 2011 17:54, Ruslan Mahmatkhanov wrote: >> Hello. >> >> I'm planning to finish repocopy of www/zope213 this evening. Would you >> please review rc-script that is supplied with it [1]? >> >> I get this one from www/zope211 and minimally changed it, and as far i >> can tell dougb@ was the last person who touched it, so it should be ok, >> but i'm asking for review just for the case. >> >> I'm attached the script in question and provide the link to it for the >> case if mailmain will eat it. >> >> Thank you much in advance. > > I could get yelled at for this, but normally I'd prefer: Please yell, i'm not experienced in rc at all, so i'll be glad any guidance (in any form) to raise it (experience) :). But i thought that it's safe to use existing scripts from the tree. > start_cmd="${name}_start" > > over > > start_cmd="zope213_start". > > Chris Fixed, thank you. I also added `KEYWORD: shutdown' per PH, because of zope starting under non-root user. Is there still any problems in the script? Updated version here: https://github.com/mexicarne/zope/blob/master/www/zope213/files/zope213.in -- Regards, Ruslan Tinderboxing kills... the drives. From owner-freebsd-rc@FreeBSD.ORG Wed Nov 30 18:56:30 2011 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 463FC106564A for ; Wed, 30 Nov 2011 18:56:30 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 06BB78FC08 for ; Wed, 30 Nov 2011 18:56:29 +0000 (UTC) Received: by ywp17 with SMTP id 17so1505661ywp.13 for ; Wed, 30 Nov 2011 10:56:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=nvhe8Fi2C5KAI1IllDTvK0WSq9xfW4wyyelKGVjrUMc=; b=XDZi3f7P727eY22hgEDH3Wu7jQkMwxESDnPn/95pX+dg2CwLPE7UYw3Cb3W5+OOZ0F Ygm4Yx0c7CDC204xaU/QcnYs25pcGjnwmId1fWzlkb9vNh4t3z6n+UTG4MWj3lWLM45X HFt5tAl7jkVTamRRoYhHolTpV1gAAlLD1rYsc= Received: by 10.50.169.33 with SMTP id ab1mr4156923igc.0.1322679389475; Wed, 30 Nov 2011 10:56:29 -0800 (PST) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.231.12.139 with HTTP; Wed, 30 Nov 2011 10:55:58 -0800 (PST) In-Reply-To: <4ED67B8F.50109@yandex.ru> References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> From: Chris Rees Date: Wed, 30 Nov 2011 18:55:58 +0000 X-Google-Sender-Auth: Lee7phmH9wOm3nZnUdn3A0jQdTg Message-ID: To: Ruslan Mahmatkhanov Content-Type: text/plain; charset=KOI8-R Cc: freebsd-rc@freebsd.org Subject: Re: rc-script review request 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, 30 Nov 2011 18:56:30 -0000 On 30 November 2011 18:53, Ruslan Mahmatkhanov wrote: > Chris Rees wrote on 30.11.2011 22:15: >> On 30 November 2011 17:54, Ruslan Mahmatkhanov wrote: >>> Hello. >>> >>> I'm planning to finish repocopy of www/zope213 this evening. Would you >>> please review rc-script that is supplied with it [1]? >>> >>> I get this one from www/zope211 and minimally changed it, and as far i >>> can tell dougb@ was the last person who touched it, so it should be ok, >>> but i'm asking for review just for the case. >>> >>> I'm attached the script in question and provide the link to it for the >>> case if mailmain will eat it. >>> >>> Thank you much in advance. >> >> I could get yelled at for this, but normally I'd prefer: > > Please yell, i'm not experienced in rc at all, so i'll be glad any > guidance (in any form) to raise it (experience) :). But i thought that > it's safe to use existing scripts from the tree. > >> start_cmd="${name}_start" >> >> over >> >> start_cmd="zope213_start". >> >> Chris > > Fixed, thank you. I also added `KEYWORD: shutdown' per PH, because of > zope starting under non-root user. Is there still any problems in the > script? Updated version here: > > https://github.com/mexicarne/zope/blob/master/www/zope213/files/zope213.in I'm not going to sign you off on it, but it looks OK to me. Doug will be back soon :) Chris From owner-freebsd-rc@FreeBSD.ORG Wed Nov 30 19:01:03 2011 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 1CC1E106564A; Wed, 30 Nov 2011 19:01:03 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward6.mail.yandex.net (forward6.mail.yandex.net [IPv6:2a02:6b8:0:202::1]) by mx1.freebsd.org (Postfix) with ESMTP id 8AFEE8FC29; Wed, 30 Nov 2011 19:01:02 +0000 (UTC) Received: from smtp8.mail.yandex.net (smtp8.mail.yandex.net [77.88.61.54]) by forward6.mail.yandex.net (Yandex) with ESMTP id E7E16F80C47; Wed, 30 Nov 2011 23:01:00 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322679660; bh=Z9Y+GI7ik75nHyWEUXXexyk0AeB/x6QGtLxAurudmuI=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=O7cf9o+FDpE5MchFkDsQxCZvSPbOGMYqq3Xfh9CIE2dZgHbhYlYR2x+jWaqAGQGHZ D5sc6bYtd2DUxmVgz8ldt4V+3WHovgynW0zBaQX102pL47FIUnc1hwnu31bg5Ix9p7 HbLIhcf03Nkff8EjlpXyusOsznujGxExg0eSdcYI= Received: from smtp8.mail.yandex.net (localhost [127.0.0.1]) by smtp8.mail.yandex.net (Yandex) with ESMTP id C4DAB1B603E4; Wed, 30 Nov 2011 23:01:00 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322679660; bh=Z9Y+GI7ik75nHyWEUXXexyk0AeB/x6QGtLxAurudmuI=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=O7cf9o+FDpE5MchFkDsQxCZvSPbOGMYqq3Xfh9CIE2dZgHbhYlYR2x+jWaqAGQGHZ D5sc6bYtd2DUxmVgz8ldt4V+3WHovgynW0zBaQX102pL47FIUnc1hwnu31bg5Ix9p7 HbLIhcf03Nkff8EjlpXyusOsznujGxExg0eSdcYI= Received: from unknown (unknown [213.138.88.133]) by smtp8.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 0xAuvd0m-10AKN98D; Wed, 30 Nov 2011 23:01:00 +0400 X-Yandex-Spam: 1 Message-ID: <4ED67D59.9080903@yandex.ru> Date: Wed, 30 Nov 2011 23:00:41 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111109 Thunderbird/8.0 MIME-Version: 1.0 To: Chris Rees References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> In-Reply-To: X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: rc-script review request 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, 30 Nov 2011 19:01:03 -0000 Chris Rees wrote on 30.11.2011 22:55: > On 30 November 2011 18:53, Ruslan Mahmatkhanov wrote: >> Chris Rees wrote on 30.11.2011 22:15: >>> On 30 November 2011 17:54, Ruslan Mahmatkhanov wrote: >>>> Hello. >>>> >>>> I'm planning to finish repocopy of www/zope213 this evening. Would you >>>> please review rc-script that is supplied with it [1]? >>>> >>>> I get this one from www/zope211 and minimally changed it, and as far i >>>> can tell dougb@ was the last person who touched it, so it should be ok, >>>> but i'm asking for review just for the case. >>>> >>>> I'm attached the script in question and provide the link to it for the >>>> case if mailmain will eat it. >>>> >>>> Thank you much in advance. >>> >>> I could get yelled at for this, but normally I'd prefer: >> >> Please yell, i'm not experienced in rc at all, so i'll be glad any >> guidance (in any form) to raise it (experience) :). But i thought that >> it's safe to use existing scripts from the tree. >> >>> start_cmd="${name}_start" >>> >>> over >>> >>> start_cmd="zope213_start". >>> >>> Chris >> >> Fixed, thank you. I also added `KEYWORD: shutdown' per PH, because of >> zope starting under non-root user. Is there still any problems in the >> script? Updated version here: >> >> https://github.com/mexicarne/zope/blob/master/www/zope213/files/zope213.in > > I'm not going to sign you off on it, but it looks OK to me. > > Doug will be back soon :) > > Chris Og, waiting for Doug then. -- Regards, Ruslan Tinderboxing kills... the drives. From owner-freebsd-rc@FreeBSD.ORG Wed Nov 30 21:03:28 2011 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 8611A1065670; Wed, 30 Nov 2011 21:03:28 +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 1C6F68FC0C; Wed, 30 Nov 2011 21:03:28 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 7727A359B8C; Wed, 30 Nov 2011 22:03:27 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 5F32328468; Wed, 30 Nov 2011 22:03:27 +0100 (CET) Date: Wed, 30 Nov 2011 22:03:27 +0100 From: Jilles Tjoelker To: Warner Losh Message-ID: <20111130210327.GA21283@stack.nl> References: <00701089-9A0A-4309-8A6B-D6AF34CDEBF0@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00701089-9A0A-4309-8A6B-D6AF34CDEBF0@bsdimp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-x11@freebsd.org, Aryeh Friedman , rc@freebsd.org, Chris Rees Subject: Re: xdm does not work junder BETA3 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, 30 Nov 2011 21:03:28 -0000 On Wed, Nov 30, 2011 at 10:16:06AM -0700, Warner Losh wrote: > /var/run isn't ever cleared on boot. The script /etc/rc.d/cleanvar, enabled by default, does this. > Programs are supposed to cope with with stale .pid files, since they > might have died w/o deleting it... Without cleanvar, after an unclean reboot we would likely end up with some pidfiles that look valid (because the process exists) but are not. Checking the executable of the running process may help but is not always done and not fully reliable either (for example if you run many instances of the same daemon executable). -- Jilles Tjoelker From owner-freebsd-rc@FreeBSD.ORG Wed Nov 30 23:38:47 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 7DE931065670; Wed, 30 Nov 2011 23:38:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 4CC0314DE29; Wed, 30 Nov 2011 23:38:47 +0000 (UTC) Message-ID: <4ED6BE87.4060408@FreeBSD.org> Date: Wed, 30 Nov 2011 15:38:47 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Ruslan Mahmatkhanov References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> In-Reply-To: <4ED67B8F.50109@yandex.ru> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: multipart/mixed; boundary="------------040004080509000701030605" Cc: freebsd-rc@freebsd.org Subject: Re: rc-script review request 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, 30 Nov 2011 23:38:47 -0000 This is a multi-part message in MIME format. --------------040004080509000701030605 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 11/30/2011 10:53, Ruslan Mahmatkhanov wrote: > Chris Rees wrote on 30.11.2011 22:15: >> I could get yelled at for this, but normally I'd prefer: > > Please yell, i'm not experienced in rc at all, so i'll be glad any > guidance (in any form) to raise it (experience) :). But i thought that > it's safe to use existing scripts from the tree. Ruslan, the problem is that there are a lot of bad examples already in the tree. :) >> start_cmd="${name}_start" >> >> over >> >> start_cmd="zope213_start". Yes, using variables where it's clear what's being done is preferred, since that will facilitate reuse of *good* examples. > Fixed, thank you. I also added `KEYWORD: shutdown' per PH, because of > zope starting under non-root user. You use 'shutdown' because it starts a persistent service, and we want to shut those down cleanly and in order. If the service runs under a non-root user it needs REQUIRE: LOGIN instead of DAEMON. However, I don't see that it runs as a non-root user, unless zopectl handles that for you? > Is there still any problems in the script? 1. Always use tabs 2. Make the start/stop/restart printouts fit rc.d style a little more 3. Simplify the shell code for dealing with command line arguments 4. $@ should be used there instead of $* because the former treats the elements as discrete, which is what you want to feed a for loop. 5. Move the default for _enable up to where we like it to be. 6. Localize the variable in zope213ctl() But there is a more fundamental problem. You seem to be requiring the user to supply an instance argument for the script to work at all. That's contrary to how we generally do things, and I'm fairly confident that this is not going to work on startup. I think that what you need is to provide at least one default, so after the default for _enable you'd have something like this: : ${zope213_instances:=%%PREFIX%%} (assuming that /usr/local is the default Then you need an additional function: zope213_check_instances () { cmd="$1" shift if [ -n "$@" ]; then zope213_instances="$@" elif [ -z "$zope213_instances" ]; then err 1 "No value for zope213_instances, so nothing to do" fi } And call that function first in each of your start/stop/restart functions. You should test that of course. :) hth, Doug -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ --------------040004080509000701030605 Content-Type: text/plain; name="zope213.in" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="zope213.in" #!/bin/sh # # Startup script for Zope server. # # $FreeBSD: ports/www/zope211/files/zope211.in,v 1.3 2011/05/15 02:49:17 dougb Exp $ # # PROVIDE: zope213 # REQUIRE: DAEMON # KEYWORD: shutdown # Define these zope213_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/zope213 # # zope213_enable : bool # Enable Zope ("YES") or not ("NO", the default). # # zope213_instances : list # List of dirs with Zope's instances ("" by default). # . /etc/rc.subr name="zope213" rcvar=`set_rcvar` load_rc_config $name : ${zope213_enable:="NO"} zope213ctl () { local instance for instance in $zope213_instances; do if [ -d ${instance} ]; then echo -n " Zope instance ${instance} -> " ${instance}/bin/zopectl "$1" fi done } zope213_start () { echo -n 'Starting Zope 2.13:' zope213ctl "start" echo '.' } zope213_stop () { echo -n 'Stopping Zope 2.13:' zope213ctl "stop" echo '.' } zope213_restart () { echo -n 'Restarting Zope 2.13:' zope213ctl "restart" echo '.' } start_cmd="${name}_start" stop_cmd="${name}_stop" restart_cmd="${name}_restart" cmd="$1" shift zope213_instances="$@" run_rc_command "${cmd}" --------------040004080509000701030605-- From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 01:14:34 2011 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 12A411065673; Thu, 1 Dec 2011 01:14:34 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id B38018FC16; Thu, 1 Dec 2011 01:14:33 +0000 (UTC) Received: by ggnk5 with SMTP id k5so2004116ggn.13 for ; Wed, 30 Nov 2011 17:14:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=XbdiBKZleeQDVeXYR+9wG6/tN/dlYVDNiivlXRnWvFc=; b=x4NLQLuQvAJ8nA6VMxHEhtbKn7CE23d1xApQrpM+JpAzeaBz4/XuUz32gcojZjQvM4 RshGfW0DkTZ1KmAIeYbJ0mh5epR44LgQZgUc7ycJiAtFn10NIVaoY6uiJzJJYgvAL4ei f+9wrR18nFYFVHqhT6WlhafhZL+dEN1dwtj4U= MIME-Version: 1.0 Received: by 10.182.172.41 with SMTP id az9mr994681obc.42.1322702073209; Wed, 30 Nov 2011 17:14:33 -0800 (PST) Received: by 10.182.62.227 with HTTP; Wed, 30 Nov 2011 17:14:33 -0800 (PST) In-Reply-To: <4ED6BE87.4060408@FreeBSD.org> References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> Date: Wed, 30 Nov 2011 17:14:33 -0800 Message-ID: From: Garrett Cooper To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-rc@freebsd.org, Ruslan Mahmatkhanov Subject: Re: rc-script review request 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, 01 Dec 2011 01:14:34 -0000 On Wed, Nov 30, 2011 at 3:38 PM, Doug Barton wrote: > On 11/30/2011 10:53, Ruslan Mahmatkhanov wrote: >> Chris Rees wrote on 30.11.2011 22:15: > >>> I could get yelled at for this, but normally I'd prefer: >> >> Please yell, i'm not experienced in rc at all, so i'll be glad any >> guidance (in any form) to raise it (experience) :). But i thought that >> it's safe to use existing scripts from the tree. > > Ruslan, the problem is that there are a lot of bad examples already in > the tree. :) > >>> start_cmd=3D"${name}_start" >>> >>> over >>> >>> start_cmd=3D"zope213_start". > > Yes, using variables where it's clear what's being done is preferred, > since that will facilitate reuse of *good* examples. > >> Fixed, thank you. I also added `KEYWORD: shutdown' per PH, because of >> zope starting under non-root user. > > You use 'shutdown' because it starts a persistent service, and we want > to shut those down cleanly and in order. If the service runs under a > non-root user it needs REQUIRE: LOGIN instead of DAEMON. However, I > don't see that it runs as a non-root user, unless zopectl handles that > for you? > >> Is there still any problems in the script? > > 1. Always use tabs > 2. Make the start/stop/restart printouts fit rc.d style a little more > 3. Simplify the shell code for dealing with command line arguments > 4. $@ should be used there instead of $* because the former treats the > elements as discrete, which is what you want to feed a for loop. > 5. Move the default for _enable up to where we like it to be. > 6. Localize the variable in zope213ctl() > > But there is a more fundamental problem. You seem to be requiring the > user to supply an instance argument for the script to work at all. > That's contrary to how we generally do things, and I'm fairly confident > that this is not going to work on startup. > > I think that what you need is to provide at least one default, so after > the default for _enable you'd have something like this: > > : ${zope213_instances:=3D%%PREFIX%%} > (assuming that /usr/local is the default > > Then you need an additional function: > > zope213_check_instances () { > =A0 =A0 =A0 =A0cmd=3D"$1" > =A0 =A0 =A0 =A0shift > > =A0 =A0 =A0 =A0if [ -n "$@" ]; then > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0zope213_instances=3D"$@" > =A0 =A0 =A0 =A0elif [ -z "$zope213_instances" ]; then > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0err 1 "No value for zope213_instances, so = nothing to do" > =A0 =A0 =A0 =A0fi > } > > And call that function first in each of your start/stop/restart functions= . > > You should test that of course. :) Crazy thought -- should a script be made for rc scripts, similar to portcheck? Thanks! -Garrett From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 06:23:12 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 77B17106566B for ; Thu, 1 Dec 2011 06:23:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id DAD7D1544D3; Thu, 1 Dec 2011 06:21:21 +0000 (UTC) Message-ID: <4ED71CE1.2010101@FreeBSD.org> Date: Wed, 30 Nov 2011 22:21:21 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Garrett Cooper References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org, Ruslan Mahmatkhanov Subject: Re: rc-script review request 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, 01 Dec 2011 06:23:12 -0000 On 11/30/2011 17:14, Garrett Cooper wrote: > Crazy thought -- should a script be made for rc scripts, similar > to portcheck? I look forward to reviewing your patches to implement this feature. :) Seriously though, I've thought about it, but the problem is that the number of variables is really high, and unlike port Makefiles there are very few standard elements that exist in a predetermined order. OTOH, I'd be happy to be proven wrong. Doug -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 07:20:09 2011 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 15E1F1065675; Thu, 1 Dec 2011 07:20:09 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id B19CB8FC17; Thu, 1 Dec 2011 07:20:08 +0000 (UTC) Received: by ywp17 with SMTP id 17so2391991ywp.13 for ; Wed, 30 Nov 2011 23:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=SrIYcjbP7YGKtltI363A1hF+8mMKLanf/UUsa7xpmXg=; b=Uq1hRZ6/HFnyQZ/dKY8CGBqszLZyWeDE/NCi7CYXOYQvLIhHAIQDSH6QgUGuz1ayLH T2NZbGpw/Q21YJkfTBSlL6Cm1P2yQtCGTXrFnbQwYq0QV6lbjdAgyCXhnjgB4wSQENp4 3qFNLOz5v+bXp2ivgHwLpDNvGrLC3ygBQw3qA= MIME-Version: 1.0 Received: by 10.182.172.41 with SMTP id az9mr1204819obc.42.1322724007918; Wed, 30 Nov 2011 23:20:07 -0800 (PST) Received: by 10.182.62.227 with HTTP; Wed, 30 Nov 2011 23:20:07 -0800 (PST) In-Reply-To: <4ED71CE1.2010101@FreeBSD.org> References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> <4ED71CE1.2010101@FreeBSD.org> Date: Wed, 30 Nov 2011 23:20:07 -0800 Message-ID: From: Garrett Cooper To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-rc@freebsd.org, Ruslan Mahmatkhanov Subject: Re: rc-script review request 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, 01 Dec 2011 07:20:09 -0000 On Wed, Nov 30, 2011 at 10:21 PM, Doug Barton wrote: > On 11/30/2011 17:14, Garrett Cooper wrote: >> =A0 =A0 Crazy thought -- should a script be made for rc scripts, similar >> to portcheck? I meant portlint, BTW.. not portcheck :). > I look forward to reviewing your patches to implement this feature. :) Yipes... I have some work ahead of me. portlink is 3k lines of perlness... > Seriously though, I've thought about it, but the problem is that the > number of variables is really high, and unlike port Makefiles there are > very few standard elements that exist in a predetermined order. Well, yeah.. you can't catch everything, but it wouldn't hurt to catch basic issues so you wouldn't have to be bothered to review first drafts of code. > OTOH, I'd be happy to be proven wrong. Thanks! -Garrett From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 07:39:44 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id E4544106564A for ; Thu, 1 Dec 2011 07:39:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id A81E3153B94; Thu, 1 Dec 2011 07:39:44 +0000 (UTC) Message-ID: <4ED72F40.10701@FreeBSD.org> Date: Wed, 30 Nov 2011 23:39:44 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Eitan Adler References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> <4ED71CE1.2010101@FreeBSD.org> In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Garrett Cooper , freebsd-rc@freebsd.org, Ruslan Mahmatkhanov Subject: Re: rc-script review request 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, 01 Dec 2011 07:39:45 -0000 On 11/30/2011 23:34, Eitan Adler wrote: > On Thu, Dec 1, 2011 at 1:21 AM, Doug Barton wrote: >> Seriously though, I've thought about it, but the problem is that the >> number of variables is really high, and unlike port Makefiles there are >> very few standard elements that exist in a predetermined order. >> >> OTOH, I'd be happy to be proven wrong. > > Perhaps you (or others) could create a wiki page of common rc issues? > Even if we don't have a script that automatically verifies the rc > script, having a checklist is useful. You mean something like: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 08:01:54 2011 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 3F0AC106566C for ; Thu, 1 Dec 2011 08:01:54 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id C61338FC13 for ; Thu, 1 Dec 2011 08:01:53 +0000 (UTC) Received: by bkat2 with SMTP id t2so2118852bka.13 for ; Thu, 01 Dec 2011 00:01:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=2HVweyh5smR+fx95Uizg62LPuguXr74VdGa6ysnxhm8=; b=aJuJPULDBio8PKc/v2gswqlX53jFNLWRxFtV8/lOffJDLmflMJ6MzhQffkvvGcQfld e/nG5YTIzABfCwPcTjPraVv1TR8jlZtXi6BHhKsbMBTb5PmnghurQRSscpCTgyxozCgr wSsNOEM2IAGFid0oKvlFbpRfmX2aBgywMF3rU= Received: by 10.204.157.27 with SMTP id z27mr5915739bkw.37.1322724913738; Wed, 30 Nov 2011 23:35:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.161.195 with HTTP; Wed, 30 Nov 2011 23:34:42 -0800 (PST) In-Reply-To: <4ED71CE1.2010101@FreeBSD.org> References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> <4ED71CE1.2010101@FreeBSD.org> From: Eitan Adler Date: Thu, 1 Dec 2011 02:34:42 -0500 Message-ID: To: Doug Barton Content-Type: text/plain; charset=UTF-8 Cc: Garrett Cooper , freebsd-rc@freebsd.org, Ruslan Mahmatkhanov Subject: Re: rc-script review request 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, 01 Dec 2011 08:01:54 -0000 On Thu, Dec 1, 2011 at 1:21 AM, Doug Barton wrote: > Seriously though, I've thought about it, but the problem is that the > number of variables is really high, and unlike port Makefiles there are > very few standard elements that exist in a predetermined order. > > OTOH, I'd be happy to be proven wrong. Perhaps you (or others) could create a wiki page of common rc issues? Even if we don't have a script that automatically verifies the rc script, having a checklist is useful. -- Eitan Adler From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 08:56:51 2011 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 2F0D5106564A; Thu, 1 Dec 2011 08:56:51 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8BEF78FC15; Thu, 1 Dec 2011 08:56:50 +0000 (UTC) Received: by eekc13 with SMTP id c13so1438550eek.13 for ; Thu, 01 Dec 2011 00:56:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=0Yu5c68Gtk7MPIo2xM5EfdOnK9wJpdJn3R6cvi40JrA=; b=OaOh3ON46sP5i/U0gOFmX92BZuEUoIsA+KbLEhHLgGELoWdWIpGp0FjkpngPk/lxRn wNr97N13qiWCA4gF0oFzfk71F92CoolXVo9DT1v2mGBRcAZvE5SXQgadEoqewl4U1Jf4 LWdpcNiTVDpW2NmRhtWfNCPw66i2lM7JwN9QE= Received: by 10.227.209.85 with SMTP id gf21mr2489904wbb.5.1322729809353; Thu, 01 Dec 2011 00:56:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.30.82 with HTTP; Thu, 1 Dec 2011 00:56:18 -0800 (PST) In-Reply-To: <4ED72F40.10701@FreeBSD.org> References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> <4ED71CE1.2010101@FreeBSD.org> <4ED72F40.10701@FreeBSD.org> From: Eitan Adler Date: Thu, 1 Dec 2011 03:56:18 -0500 Message-ID: To: Doug Barton Content-Type: text/plain; charset=UTF-8 Cc: Garrett Cooper , freebsd-rc@freebsd.org, Ruslan Mahmatkhanov Subject: Re: rc-script review request 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, 01 Dec 2011 08:56:51 -0000 On Thu, Dec 1, 2011 at 2:39 AM, Doug Barton wrote: > You mean something like: > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html Yes, but more checklist like and nitpicky. Something like http://www.freebsd.org/doc/en/books/porters-handbook/porting-dads.html but geared towards rc scripts. -- Eitan Adler From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 09:49:19 2011 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 052901065670; Thu, 1 Dec 2011 09:49:19 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id C81938FC12; Thu, 1 Dec 2011 09:49:18 +0000 (UTC) Received: by dafa1 with SMTP id a1so236622daf.13 for ; Thu, 01 Dec 2011 01:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PuA9OsuyIAelfLNGsu6XyjVfdMAKM4PyCKLGviy8/Uc=; b=TNlN7Yanc/1yly9x5ra0HeQJEUdagAjJH6jh0oxjjXVrk7qfB0X0OMgedj718Bowg7 fVbZwDQ0pvOa+rYnnMJIThYrzUAq3CTX3bOibz6UePSeDYpQnDv5NfWEPw/erItenyZz ycNND9AEsCUBE3RM1et8hFyQWtxQOPz0LfP0A= MIME-Version: 1.0 Received: by 10.68.44.230 with SMTP id h6mr3753508pbm.23.1322732958283; Thu, 01 Dec 2011 01:49:18 -0800 (PST) Received: by 10.68.42.132 with HTTP; Thu, 1 Dec 2011 01:49:18 -0800 (PST) In-Reply-To: References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> <4ED71CE1.2010101@FreeBSD.org> <4ED72F40.10701@FreeBSD.org> Date: Thu, 1 Dec 2011 01:49:18 -0800 Message-ID: From: Garrett Cooper To: Eitan Adler Content-Type: text/plain; charset=ISO-8859-1 Cc: Doug Barton , freebsd-rc@freebsd.org, Ruslan Mahmatkhanov Subject: Re: rc-script review request 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, 01 Dec 2011 09:49:19 -0000 On Thu, Dec 1, 2011 at 12:56 AM, Eitan Adler wrote: > On Thu, Dec 1, 2011 at 2:39 AM, Doug Barton wrote: >> You mean something like: >> >> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html > > Yes, but more checklist like and nitpicky. Something like > http://www.freebsd.org/doc/en/books/porters-handbook/porting-dads.html > but geared towards rc > scripts. +1. -Garrett From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 18:04:03 2011 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 DC870106567A; Thu, 1 Dec 2011 18:04:02 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward13.mail.yandex.net (forward13.mail.yandex.net [IPv6:2a02:6b8:0:801::3]) by mx1.freebsd.org (Postfix) with ESMTP id 010EB8FC24; Thu, 1 Dec 2011 18:04:01 +0000 (UTC) Received: from smtp12.mail.yandex.net (smtp12.mail.yandex.net [95.108.131.191]) by forward13.mail.yandex.net (Yandex) with ESMTP id 537821447A4; Thu, 1 Dec 2011 22:04:00 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322762640; bh=l77LWnHDXlxnk4RPMyJhFHuhbGaa+F8WGMKDZ30paFA=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=cmikkGH/abcBJi30KNe9bpDq6ezp3Q5zbghB02ycyIcJrG3zF9amc6CUGkSniOECL VGbt4Hb2uIvf7IAlF8Xvnnh64OhCCkU96oajdmRNxQApEpqcd9XilHggjWCyAWb41m Jn4RHYuXLKKZuIvRXLl4V3LVaiBBdhXcuShPtfJk= Received: from smtp12.mail.yandex.net (localhost [127.0.0.1]) by smtp12.mail.yandex.net (Yandex) with ESMTP id 2597E16A04C3; Thu, 1 Dec 2011 22:04:00 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322762640; bh=l77LWnHDXlxnk4RPMyJhFHuhbGaa+F8WGMKDZ30paFA=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=cmikkGH/abcBJi30KNe9bpDq6ezp3Q5zbghB02ycyIcJrG3zF9amc6CUGkSniOECL VGbt4Hb2uIvf7IAlF8Xvnnh64OhCCkU96oajdmRNxQApEpqcd9XilHggjWCyAWb41m Jn4RHYuXLKKZuIvRXLl4V3LVaiBBdhXcuShPtfJk= Received: from unknown (unknown [178.76.224.133]) by smtp12.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 3ximlN79-3xieqD7i; Thu, 1 Dec 2011 22:03:59 +0400 X-Yandex-Spam: 1 Message-ID: <4ED7C17B.2060709@yandex.ru> Date: Thu, 01 Dec 2011 22:03:39 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111109 Thunderbird/8.0 MIME-Version: 1.0 To: Doug Barton References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> In-Reply-To: <4ED6BE87.4060408@FreeBSD.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: rc-script review request 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, 01 Dec 2011 18:04:03 -0000 Doug Barton wrote on 01.12.2011 03:38: > On 11/30/2011 10:53, Ruslan Mahmatkhanov wrote: > >> Fixed, thank you. I also added `KEYWORD: shutdown' per PH, because of >> zope starting under non-root user. > > You use 'shutdown' because it starts a persistent service, and we want > to shut those down cleanly and in order. If the service runs under a > non-root user it needs REQUIRE: LOGIN instead of DAEMON. However, I > don't see that it runs as a non-root user, unless zopectl handles that > for you? Yes, zopectl actually handling that - it drops privileges to user that's defined in ${instance}/etc/zope.conf (default `www'). I changed REQUIRE to LOGIN though. >> Is there still any problems in the script? > > 1. Always use tabs > 2. Make the start/stop/restart printouts fit rc.d style a little more > 3. Simplify the shell code for dealing with command line arguments > 4. $@ should be used there instead of $* because the former treats the > elements as discrete, which is what you want to feed a for loop. > 5. Move the default for _enable up to where we like it to be. > 6. Localize the variable in zope213ctl() I merged all the changes from you except this part: cmd="$1" -[ $# -gt 0 ] && shift -[ -n "$*" ] && zope213_instances="$*" +shift +zope213_instances="$@" Dunno why, but it didn't working - service just doesn't starting. To be honest, i'm half-understand your changes because i mooched shell-scripting lessons in the school. > But there is a more fundamental problem. You seem to be requiring the > user to supply an instance argument for the script to work at all. > That's contrary to how we generally do things, and I'm fairly confident > that this is not going to work on startup. > > I think that what you need is to provide at least one default, so after > the default for _enable you'd have something like this: > > : ${zope213_instances:=%%PREFIX%%} > (assuming that /usr/local is the default I understand what you talking about, and i'm agree that this is not much correct to not have default value for an instance. I'll try to follow you suggestions and kode to implement this behaviour, thank you! > Then you need an additional function: > > zope213_check_instances () { > cmd="$1" > shift > > if [ -n "$@" ]; then > zope213_instances="$@" > elif [ -z "$zope213_instances" ]; then > err 1 "No value for zope213_instances, so nothing to do" > fi > } > > And call that function first in each of your start/stop/restart functions. > > You should test that of course. :) > > > hth, > > Doug > -- Regards, Ruslan Tinderboxing kills... the drives. From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 18:24:08 2011 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 514F61065672; Thu, 1 Dec 2011 18:24:08 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward6.mail.yandex.net (forward6.mail.yandex.net [IPv6:2a02:6b8:0:202::1]) by mx1.freebsd.org (Postfix) with ESMTP id C06F48FC08; Thu, 1 Dec 2011 18:24:07 +0000 (UTC) Received: from smtp8.mail.yandex.net (smtp8.mail.yandex.net [77.88.61.54]) by forward6.mail.yandex.net (Yandex) with ESMTP id 3538EF81BA5; Thu, 1 Dec 2011 22:24:06 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322763846; bh=CykSywyi1h+Jj7fZENsjDyZwU1FcosGYLWgGB05ZiLc=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=pMFEuiY8dHCTEnoqLoC/jBVLMkP+3bN+W0yfHsyFx6Sn1ypiHhxEpRgDzjnjHuSz8 XGdjRhmzOFJ5lWvBKDiXHVzjjeB3R+kumuz/41PyBRHZU8d/toM2bRue00PODJbueC t+9goQZ0E8aczpJMkAkr1kKnuI2n1z+sM4euFVEQ= Received: from smtp8.mail.yandex.net (localhost [127.0.0.1]) by smtp8.mail.yandex.net (Yandex) with ESMTP id 074C51B60510; Thu, 1 Dec 2011 22:24:05 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322763846; bh=CykSywyi1h+Jj7fZENsjDyZwU1FcosGYLWgGB05ZiLc=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=pMFEuiY8dHCTEnoqLoC/jBVLMkP+3bN+W0yfHsyFx6Sn1ypiHhxEpRgDzjnjHuSz8 XGdjRhmzOFJ5lWvBKDiXHVzjjeB3R+kumuz/41PyBRHZU8d/toM2bRue00PODJbueC t+9goQZ0E8aczpJMkAkr1kKnuI2n1z+sM4euFVEQ= Received: from unknown (unknown [178.76.224.133]) by smtp8.mail.yandex.net (nwsmtp/Yandex) with ESMTP id O4AigWsF-O5AiYbQl; Thu, 1 Dec 2011 22:24:05 +0400 X-Yandex-Spam: 1 Message-ID: <4ED7C631.3070608@yandex.ru> Date: Thu, 01 Dec 2011 22:23:45 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111109 Thunderbird/8.0 MIME-Version: 1.0 To: Doug Barton References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> <4ED7C17B.2060709@yandex.ru> In-Reply-To: <4ED7C17B.2060709@yandex.ru> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: rc-script review request 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, 01 Dec 2011 18:24:08 -0000 Ruslan Mahmatkhanov wrote on 01.12.2011 22:03: > I merged all the changes from you except this part: > > cmd="$1" > -[ $# -gt 0 ] && shift > -[ -n "$*" ] && zope213_instances="$*" > +shift > +zope213_instances="$@" > Dunno why, but it didn't working - service just doesn't starting. To be > honest, i'm half-understand your changes because i mooched > shell-scripting lessons in the school. Please ignore this one. Looks like i mistyped something when editing it in first time. -- Regards, Ruslan Tinderboxing kills... the drives. From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 19:27:02 2011 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 36AAB106566C; Thu, 1 Dec 2011 19:27:02 +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 C31D18FC08; Thu, 1 Dec 2011 19:27:01 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id E44BF35A9F3; Thu, 1 Dec 2011 20:26:59 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id CC5E528468; Thu, 1 Dec 2011 20:26:59 +0100 (CET) Date: Thu, 1 Dec 2011 20:26:59 +0100 From: Jilles Tjoelker To: Doug Barton Message-ID: <20111201192659.GA29936@stack.nl> References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ED6BE87.4060408@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-rc@freebsd.org, Ruslan Mahmatkhanov Subject: Re: rc-script review request 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, 01 Dec 2011 19:27:02 -0000 On Wed, Nov 30, 2011 at 03:38:47PM -0800, Doug Barton wrote: > 4. $@ should be used there instead of $* because the former treats the > elements as discrete, which is what you want to feed a for loop. This is assuming you want the arguments as separate fields right there. Variables can only contain a single field. > zope213_check_instances () { > cmd="$1" > shift > if [ -n "$@" ]; then This probably does not do what you want if $# is not 1, because of the word splitting. > zope213_instances="$@" With our sh, this is equivalent to zope213_instances="$*" but it is less portable. POSIX defines "$@" as potentially resulting in multiple words, which does not mean anything if it is in a context where word splitting is not performed. In practice, some other shells separate the arguments using a space rather than the first character of IFS. Another reason to use "$*" here is that "$*" does the same thing in contexts where word splitting occurs. > elif [ -z "$zope213_instances" ]; then > err 1 "No value for zope213_instances, so nothing to do" > fi > } -- Jilles Tjoelker From owner-freebsd-rc@FreeBSD.ORG Thu Dec 1 19:31:54 2011 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 B9568106566C; Thu, 1 Dec 2011 19:31:54 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward20.mail.yandex.net (forward20.mail.yandex.net [IPv6:2a02:6b8:0:1402::5]) by mx1.freebsd.org (Postfix) with ESMTP id 33FA48FC08; Thu, 1 Dec 2011 19:31:54 +0000 (UTC) Received: from smtp17.mail.yandex.net (smtp17.mail.yandex.net [95.108.252.17]) by forward20.mail.yandex.net (Yandex) with ESMTP id 58F7F10427AF; Thu, 1 Dec 2011 23:31:50 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322767910; bh=xTJku+TE/QVJmOkNInbW2MDTr5cw5Axv/vii14a/3eA=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=ljJFwioUyIAFJVqWqub2Lv0PIvUQJw7EjRAqoGBPRiyYu4Jif1gIBC3LprT9ySbrN lpNDjqQygRfGu0cQqotdLkTlOup2Vn7KfLveBOLGBM0cW5/uS8UXyN3BP9B70sOL2l wCe7jH7LJUovzNqDUhwSr02bOjjGSpqbgYmDR2nw= Received: from smtp17.mail.yandex.net (localhost [127.0.0.1]) by smtp17.mail.yandex.net (Yandex) with ESMTP id 2AAB519001D0; Thu, 1 Dec 2011 23:31:50 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1322767910; bh=xTJku+TE/QVJmOkNInbW2MDTr5cw5Axv/vii14a/3eA=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=ljJFwioUyIAFJVqWqub2Lv0PIvUQJw7EjRAqoGBPRiyYu4Jif1gIBC3LprT9ySbrN lpNDjqQygRfGu0cQqotdLkTlOup2Vn7KfLveBOLGBM0cW5/uS8UXyN3BP9B70sOL2l wCe7jH7LJUovzNqDUhwSr02bOjjGSpqbgYmDR2nw= Received: from unknown (unknown [178.76.224.133]) by smtp17.mail.yandex.net (nwsmtp/Yandex) with ESMTP id VmxKEDLn-VnxK72cs; Thu, 1 Dec 2011 23:31:49 +0400 X-Yandex-Spam: 1 Message-ID: <4ED7D611.50604@yandex.ru> Date: Thu, 01 Dec 2011 23:31:29 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111109 Thunderbird/8.0 MIME-Version: 1.0 To: Doug Barton References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> In-Reply-To: <4ED6BE87.4060408@FreeBSD.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: rc-script review request 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, 01 Dec 2011 19:31:54 -0000 Doug Barton wrote on 01.12.2011 03:38: > > I think that what you need is to provide at least one default, so after > the default for _enable you'd have something like this: > > : ${zope213_instances:=%%PREFIX%%} > (assuming that /usr/local is the default > > Then you need an additional function: > > zope213_check_instances () { > cmd="$1" > shift > > if [ -n "$@" ]; then > zope213_instances="$@" > elif [ -z "$zope213_instances" ]; then > err 1 "No value for zope213_instances, so nothing to do" > fi > } > > And call that function first in each of your start/stop/restart functions. > > You should test that of course. :) > > > hth, > > Doug > Ok, i merged all the changes by you including zope213_check_instances() and default instance directory. I had tested it both with default instance and with multiple instances - all is working just fine, thank you much! The only thing that is looking bad is: - f.e i have two instances in /usr/local/www/Zope213 - MyFirstInstance and MySecondInstance (they use different tcp ports) - i have in my rc.conf: zope213_enable="YES" #zope213_instances="/usr/local/www/Zope213/MyFirstInstance /usr/local/www/Zope213/MySecondInstance" ^^^^^^^^^^^^^^^^^^^^^^ it's a single line actually - i trying to start zope: service zope213 start - i'm getting: Starting Zope 2.13: Zope instance /usr/local/www/Zope213/ -> eval: /usr/local/www/Zope213//bin/zopectl: not found . As far i understand there should be something like "exit 1" somewhere, but i don't understand where exactly. Would you please help? There is also some problem with $*/$@ stuff. I was able to make it work only by combining them. You can see the updated script here: https://github.com/mexicarne/zope/blob/master/www/zope213/files/zope213.in Thanks. -- Regards, Ruslan Tinderboxing kills... the drives. From owner-freebsd-rc@FreeBSD.ORG Fri Dec 2 05:00:19 2011 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 6EA11106564A; Fri, 2 Dec 2011 05:00:18 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 2448F8FC08; Fri, 2 Dec 2011 05:00:17 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa03 [127.0.0.1]) by ltcfislmsgpa03.fnfis.com (8.14.4/8.14.4) with SMTP id pB24PA4U013842; Thu, 1 Dec 2011 22:34:28 -0600 Received: from smtp.fisglobal.com ([10.132.206.16]) by ltcfislmsgpa03.fnfis.com with ESMTP id 11eq7vg299-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 01 Dec 2011 22:34:28 -0600 Received: from dtwin (10.14.152.48) by smtp.fisglobal.com (10.132.206.16) with Microsoft SMTP Server (TLS) id 14.1.323.3; Thu, 1 Dec 2011 22:34:27 -0600 From: Devin Teske To: Date: Thu, 1 Dec 2011 20:34:37 -0800 Message-ID: <039201ccb0ab$b3db9470$1b92bd50$@fisglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AcywoX3isrPcfZJPQymb9z+MMLqUxg== Content-Language: en-us X-Originating-IP: [10.14.152.48] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2011-12-01_08:2011-12-02, 2011-12-01, 1970-01-01 signatures=0 Cc: Ken Smith , Parker-Smith , Dave, phk@freebsd.org, 'Julian Elischer' Subject: mount(8) bug? rc.d/mountlate bug? bug in both? 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, 02 Dec 2011 05:00:19 -0000 Hi -RC@, Julian, Poul, and Ken, We need your help on FreeBSD-8.1! Please read the following dossier on our issue with simply attempting to add a single NFS mount to fstab(5) ***without*** the side-effect of rebooting into single-user mode should that mount fail for ANY reason during boot. FULL-DISCLOSURE: We've already tried marking the filesystem as "late" and/or "bg" to no avail. We've traced the problem down to a possible bug in either mount(8) or the `/etc/rc.d/mountlate' boot-script. Need confirmation that this is a bug, OR a work-around to eliminate the numerous edge-cases where we can reliably cause the system to boot into single-user mode. ASIDE: We're longing for the days of FreeBSD-4 where NFS would simply fail and boot would still continue. Meaning that eventually you could service the system remotely -- logging in to fix the bad mounts (beit caused by typo, machine that went missing on the net, or any other reason why the mount is no longer valid). ========= ISSUE DOSSIER BELOW (THANKS AS ALWAYS) ========= The desire: You want to add an NFS mount to /etc/fstab so that it's mounted at boot. However, you also want to make it so that in-NO-way can you end up dropping to single-user mode because of this mount going bad (for any reason). The problem: Several scenarios can result in dropping to single-user mode... such as: 1. The hostname for the mount is not resolvable in DNS 2. The IP address for the mount is not routable 3. The machine providing the mount is not running NFS 4. The machine providing the mount returns "permission denied" 5. The machine providing the mount takes too long to respond ... among which any of the above can happen in any number of ways, such as a typo in `/etc/resolv.conf' before a remote reboot, et cetera (upon-which, good luck getting back into the box to fix resolv.conf(5) as the system would now be in single-user mode). You might argue that all of these scenarios SHOULD result in dropping to single-user mode on reboot, however the topic of this e-mail is not to discuss whether this should be the case but rather HOW to make it NOT the case (if possible -- without code-change) for our needs. Corollary: Having a workstation 3000+ miles away in India reboot into single-user mode simply because of a momentary network hiccup (or any other situation that could cause failure of the NFS mount) at boot is what we're trying to avoid. That is to explain, avoiding the situation where a system that is physically afar from becoming permanently unresponsive, requiring significant expenditure/effort to rectify. Discussion: We're already aware-of (and have tried) the "bg" NFS-specific filesystem flag. According to mount_nfs(8) manual, the "bg" option SHOULD be enough to make the filesystem NOT be critical to booting, yet in-practice adding this flag does NOT prevent the system from dropping to single-user mode (more below). Possible Bug: As the system is booting, /etc/rc.d/mountcritremote attempts to mount the filesystem. It fails. This is OK (because mountcritremote does not return FAILURE status -- he returns SUCCESS and boot proceeds as-expected). Later, /etc/rc.d/mountlate runs and attempts to mount it again. It fails again except this time mountlate calls "stop_boot" after the failure (dropping us to single-user mode). The "possible bug" comes into play in reading /etc/rc.d/mountlate and finding out just how exactly it determines that it should have been mounting this filesystem in the first place. mountlate calls "/sbin/mount -d -a -l" to determine if there are any "late" filesystems to mount. The filesystem is NOT marked as "late", but "/sbin/mount -d -a -l" will still report it because it's not yet mounted. This is where we need to read mount(8) to learn that "-l" doesn't mean it will report-on ONLY late-filesystems, but rather ALSO report-on late-filesystems. >From mount(8): -l When used in conjunction with -a option, also mount those file systems which are marked as ``late''. So it becomes clear that the "bg" option is not effective in making an NFS filesystem non-critical because /etc/rc.d/mountlate isn't excluding filesystems that have the "bg" flag. So, the "possible bug" is that: mountlate should go through the filesystems returned by mount(8) and check the options itself for "bg", skipping those filesystems with this option. -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-freebsd-rc@FreeBSD.ORG Fri Dec 2 05:32:07 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 2A4A0106564A; Fri, 2 Dec 2011 05:32:07 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 929EB154314; Fri, 2 Dec 2011 05:32:06 +0000 (UTC) Message-ID: <4ED862D6.9090807@FreeBSD.org> Date: Thu, 01 Dec 2011 21:32:06 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Devin Teske References: <039201ccb0ab$b3db9470$1b92bd50$@fisglobal.com> In-Reply-To: <039201ccb0ab$b3db9470$1b92bd50$@fisglobal.com> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org, Ken Smith , Parker-Smith , phk@freebsd.org, 'Julian Elischer' , Dave@FreeBSD.ORG Subject: Re: mount(8) bug? rc.d/mountlate bug? bug in both? 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, 02 Dec 2011 05:32:07 -0000 Short answer, tag the mount(s) noauto in fstab, and mount them in /etc/rc.local. More detailed analysis of your situation follows. On 12/01/2011 20:34, Devin Teske wrote: > Hi -RC@, Julian, Poul, and Ken, > > We need your help on FreeBSD-8.1! > > Please read the following dossier on our issue with simply attempting to add a > single NFS mount to fstab(5) ***without*** the side-effect of rebooting into > single-user mode should that mount fail for ANY reason during boot. > > FULL-DISCLOSURE: We've already tried marking the filesystem as "late" and/or > "bg" to no avail. We've traced the problem down to a possible bug in either > mount(8) or the `/etc/rc.d/mountlate' boot-script. Need confirmation that this > is a bug, OR a work-around to eliminate the numerous edge-cases where we can > reliably cause the system to boot into single-user mode. I don't think it's a bug in either. > Corollary: > > Having a workstation 3000+ miles away in India reboot into single-user mode > simply because of a momentary network hiccup (or any other situation that could > cause failure of the NFS mount) at boot is what we're trying to avoid. That is > to explain, avoiding the situation where a system that is physically afar from > becoming permanently unresponsive, requiring significant expenditure/effort to > rectify. If you're administrating a remote system it's reasonable to assume that you have a serial console on it. That said, we're certainly not *trying* to break stuff willy-nilly. > Possible Bug: > > As the system is booting, /etc/rc.d/mountcritremote attempts to mount the > filesystem. It fails. This is OK (because mountcritremote does not return > FAILURE status -- he returns SUCCESS and boot proceeds as-expected). > > Later, /etc/rc.d/mountlate runs and attempts to mount it again. It fails again > except this time mountlate calls "stop_boot" after the failure (dropping us to > single-user mode). This the expected/desired behavior. > The "possible bug" comes into play in reading /etc/rc.d/mountlate and finding > out just how exactly it determines that it should have been mounting this > filesystem in the first place. > > mountlate calls "/sbin/mount -d -a -l" to determine if there are any "late" > filesystems to mount. No. The -a in there means that it's looking for *all* unmounted file systems, including those marked "late." In fact a key reason for the division between mountcritremote and mountlate is that circumstances on the system may have changed to allow things that failed the first time to be mounted, *in addition to* specifically marking certain entries "late" because we know that they cannot succeed until later in the boot. > The filesystem is NOT marked as "late", but "/sbin/mount -d -a -l" will still > report it because it's not yet mounted. Right-O. > This is where we need to read mount(8) to learn that "-l" doesn't mean it will > report-on ONLY late-filesystems, but rather ALSO report-on late-filesystems. ... "When used in conjunction with the -a option ..." It's the -a bit that's important here. >>From mount(8): > > -l When used in conjunction with -a option, also mount those > file systems which are marked as ``late''. -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-rc@FreeBSD.ORG Fri Dec 2 07:13:16 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 95F441065670 for ; Fri, 2 Dec 2011 07:13:16 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 5ACCA14F776; Fri, 2 Dec 2011 07:13:16 +0000 (UTC) Message-ID: <4ED87A8C.30201@FreeBSD.org> Date: Thu, 01 Dec 2011 23:13:16 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Eitan Adler References: <4ED66DCB.1040102@yandex.ru> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org> <4ED71CE1.2010101@FreeBSD.org> <4ED72F40.10701@FreeBSD.org> In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Garrett Cooper , freebsd-rc@freebsd.org, Ruslan Mahmatkhanov Subject: Re: rc-script review request 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, 02 Dec 2011 07:13:16 -0000 On 12/01/2011 00:56, Eitan Adler wrote: > On Thu, Dec 1, 2011 at 2:39 AM, Doug Barton wrote: >> You mean something like: >> >> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html > > Yes, but more checklist like and nitpicky. I just committed the checklist I wrote up for ports-committers a while back. Comments welcome. Doug -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-rc@FreeBSD.ORG Fri Dec 2 10:08:50 2011 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 C059D106564A; Fri, 2 Dec 2011 10:08:50 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 851998FC13; Fri, 2 Dec 2011 10:08:47 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa04 [127.0.0.1]) by ltcfislmsgpa04.fnfis.com (8.14.4/8.14.4) with SMTP id pB29P7fW028866; Fri, 2 Dec 2011 04:08:46 -0600 Received: from smtp.fisglobal.com ([10.132.206.16]) by ltcfislmsgpa04.fnfis.com with ESMTP id 11eqe8rygk-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 02 Dec 2011 04:08:46 -0600 Received: from dtwin (10.14.152.48) by smtp.fisglobal.com (10.132.206.16) with Microsoft SMTP Server (TLS) id 14.1.323.3; Fri, 2 Dec 2011 04:08:45 -0600 From: Devin Teske To: "'Doug Barton'" References: <039201ccb0ab$b3db9470$1b92bd50$@fisglobal.com> <4ED862D6.9090807@FreeBSD.org> In-Reply-To: <4ED862D6.9090807@FreeBSD.org> Date: Fri, 2 Dec 2011 02:08:55 -0800 Message-ID: <039f01ccb0da$67b50f20$371f2d60$@fisglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIhmfk7Ve6JVGWlRGJXhdLF64R2wQHbinWolQ94JyA= Content-Language: en-us X-Originating-IP: [10.14.152.48] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2011-12-02_01:2011-12-02, 2011-12-02, 1970-01-01 signatures=0 Cc: freebsd-rc@freebsd.org, 'Ken Smith' , 'Parker-Smith' , phk@freebsd.org, 'Julian Elischer' , Dave@FreeBSD.ORG Subject: RE: mount(8) bug? rc.d/mountlate bug? bug in both? 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, 02 Dec 2011 10:08:50 -0000 > -----Original Message----- > From: Doug Barton [mailto:dougb@FreeBSD.org] > Sent: Thursday, December 01, 2011 9:32 PM > To: Devin Teske > Cc: freebsd-rc@freebsd.org; Ken Smith; Parker-Smith; Dave@FreeBSD.ORG; > phk@freebsd.org; 'Julian Elischer' > Subject: Re: mount(8) bug? rc.d/mountlate bug? bug in both? > > Short answer, tag the mount(s) noauto in fstab, and mount them in /etc/rc.local. > That may be the simplest approach. However, we're looking more for a solution that involves keeping the NFS mounts in fstab(5). Reason: In planning-to-upgrade hundreds of machines -- upgrading from FreeBSD-4.11 (where fstab(5) NFS failures are non-fatal) to FreeBSD-8.1 (where they are) -- the process would go smoother if we didn't have to migrate fstab(5) NFS entries in the manner you describe above. Researching and testing further, it appears that the "bg" option is almost entirely what we want. I was able to successfully achieve what I wanted with the following in fstab(5): bogus:/bogus /bogus nfs tcp,rw,nosuid,bg,late 0 0 AND adding to /etc/hosts: 128.0.0.1 bogus A timeout occurs attempting to connect to the system named "bogus" and upon failure, mount_nfs(8) properly daemon(3)izes into the background, re-attempting every 60 seconds to mount the volume. However, if I take out the /etc/hosts entry shown above (making the name unresolvable), mount_nfs(8) will this time exit immediately with error status rather than adhering to the "bg" option (which, for all intents and purposes, just because the netid for the host isn't accessible at the time, doesn't mean it won't be in 60 seconds -- thus justifying the logic that the "bg" option should apply even when the netid can't be obtained, if not especially-so). I propose the following [UNTESTED] patch, which tries to make remote-errors non-fatal to a filesystem marked as "bg". ========== BEGIN PATCH EXCERPT ========== --- sbin/mount_nfs/mount_nfs.c.orig Fri Dec 2 00:46:44 2011 +++ sbin/mount_nfs/mount_nfs.c Fri Dec 2 01:20:38 2011 @@ -803,9 +803,17 @@ getnfsargs(char *spec, struct iovec **io if (ret == TRYRET_SUCCESS) break; - /* Exit if all errors were local. */ - if (!remoteerr) - exit(1); + if ((opflags & (BGRND | ISBGRND)) == BGRND) { + warnx("Cannot immediately mount %s:%s, backgrounding", + hostp, spec); + opflags |= ISBGRND; + if (daemon(0, 0) != 0) + err(1, "daemon"); + } else { + /* Exit if all errors were local. */ + if (!remoteerr) + exit(1); + } /* * If retrycnt == 0, we are to keep retrying forever. @@ -814,13 +822,6 @@ getnfsargs(char *spec, struct iovec **io if (retrycnt != 0 && --retrycnt == 0) exit(1); - if ((opflags & (BGRND | ISBGRND)) == BGRND) { - warnx("Cannot immediately mount %s:%s, backgrounding", - hostp, spec); - opflags |= ISBGRND; - if (daemon(0, 0) != 0) - err(1, "daemon"); - } sleep(60); } freeaddrinfo(ai_nfs); ========== END PATCH EXCERPT ========== Other comments on responses to initial situation below. > More detailed analysis of your situation follows. > > On 12/01/2011 20:34, Devin Teske wrote: > > Hi -RC@, Julian, Poul, and Ken, > > > > We need your help on FreeBSD-8.1! > > > > Please read the following dossier on our issue with simply attempting > > to add a single NFS mount to fstab(5) ***without*** the side-effect of > > rebooting into single-user mode should that mount fail for ANY reason during > boot. > > > > FULL-DISCLOSURE: We've already tried marking the filesystem as "late" > > and/or "bg" to no avail. We've traced the problem down to a possible > > bug in either > > mount(8) or the `/etc/rc.d/mountlate' boot-script. Need confirmation > > that this is a bug, OR a work-around to eliminate the numerous > > edge-cases where we can reliably cause the system to boot into single-user > mode. > > I don't think it's a bug in either. You may be right. More below. > > > Corollary: > > > > Having a workstation 3000+ miles away in India reboot into single-user > > mode simply because of a momentary network hiccup (or any other > > situation that could cause failure of the NFS mount) at boot is what > > we're trying to avoid. That is to explain, avoiding the situation > > where a system that is physically afar from becoming permanently > > unresponsive, requiring significant expenditure/effort to rectify. > > If you're administrating a remote system it's reasonable to assume that you have > a serial console on it. That said, we're certainly not *trying* to break stuff willy- > nilly. No serial console enabled on the workstations/desktops. > > > Possible Bug: > > > > As the system is booting, /etc/rc.d/mountcritremote attempts to mount > > the filesystem. It fails. This is OK (because mountcritremote does not > > return FAILURE status -- he returns SUCCESS and boot proceeds as-expected). > > > > Later, /etc/rc.d/mountlate runs and attempts to mount it again. It > > fails again except this time mountlate calls "stop_boot" after the > > failure (dropping us to single-user mode). > > This the expected/desired behavior. Fair enough. > > > The "possible bug" comes into play in reading /etc/rc.d/mountlate and > > finding out just how exactly it determines that it should have been > > mounting this filesystem in the first place. > > > > mountlate calls "/sbin/mount -d -a -l" to determine if there are any "late" > > filesystems to mount. > > No. The -a in there means that it's looking for *all* unmounted file systems, > including those marked "late." Correct. > > In fact a key reason for the division between > mountcritremote and mountlate is that circumstances on the system may have > changed to allow things that failed the first time to be mounted, *in addition to* > specifically marking certain entries "late" because we know that they cannot > succeed until later in the boot. > Right. > > The filesystem is NOT marked as "late", but "/sbin/mount -d -a -l" > > will still report it because it's not yet mounted. > > Right-O. > All good. -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-freebsd-rc@FreeBSD.ORG Fri Dec 2 19:27:59 2011 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 471FB106566C; Fri, 2 Dec 2011 19:27:59 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0F48FC12; Fri, 2 Dec 2011 19:27:58 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa06 [127.0.0.1]) by ltcfislmsgpa06.fnfis.com (8.14.4/8.14.4) with SMTP id pB2JRPrY007095; Fri, 2 Dec 2011 13:27:57 -0600 Received: from smtp.fisglobal.com ([10.132.206.15]) by ltcfislmsgpa06.fnfis.com with ESMTP id 11f3rh87jk-2 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 02 Dec 2011 13:27:57 -0600 Received: from dtwin (10.14.152.48) by smtp.fisglobal.com (10.132.206.15) with Microsoft SMTP Server (TLS) id 14.1.323.3; Fri, 2 Dec 2011 13:27:57 -0600 From: Devin Teske To: "'Doug Barton'" References: <039201ccb0ab$b3db9470$1b92bd50$@fisglobal.com> <4ED862D6.9090807@FreeBSD.org> In-Reply-To: Date: Fri, 2 Dec 2011 11:28:08 -0800 Message-ID: <041701ccb128$8672a410$9357ec30$@fisglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIhmfk7Ve6JVGWlRGJXhdLF64R2wQHbinWoAaSM0Z2VAxT8YA== Content-Language: en-us X-Originating-IP: [10.14.152.48] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2011-12-02_05:2011-12-02, 2011-12-02, 1970-01-01 signatures=0 Cc: freebsd-rc@freebsd.org, 'Ken Smith' , 'Parker-Smith' , phk@freebsd.org, 'Julian Elischer' , Dave@FreeBSD.ORG Subject: RE: mount(8) bug? rc.d/mountlate bug? bug in both? 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, 02 Dec 2011 19:27:59 -0000 Update below, inline. > -----Original Message----- > From: Devin Teske [mailto:devin.teske@fisglobal.com] > Sent: Friday, December 02, 2011 2:09 AM > To: 'Doug Barton' > Cc: 'freebsd-rc@freebsd.org'; 'Ken Smith'; 'Parker-Smith'; 'Dave@FreeBSD.ORG'; > 'phk@freebsd.org'; 'Julian Elischer'; devin.teske@fisglobal.com > Subject: RE: mount(8) bug? rc.d/mountlate bug? bug in both? > > > > > -----Original Message----- > > From: Doug Barton [mailto:dougb@FreeBSD.org] > > Sent: Thursday, December 01, 2011 9:32 PM > > To: Devin Teske > > Cc: freebsd-rc@freebsd.org; Ken Smith; Parker-Smith; Dave@FreeBSD.ORG; > > phk@freebsd.org; 'Julian Elischer' > > Subject: Re: mount(8) bug? rc.d/mountlate bug? bug in both? > > > > Short answer, tag the mount(s) noauto in fstab, and mount them in > /etc/rc.local. > > > > That may be the simplest approach. > > However, we're looking more for a solution that involves keeping the NFS > mounts in fstab(5). > > Reason: In planning-to-upgrade hundreds of machines -- upgrading from > FreeBSD-4.11 (where fstab(5) NFS failures are non-fatal) to FreeBSD-8.1 (where > they are) -- the process would go smoother if we didn't have to migrate fstab(5) > NFS entries in the manner you describe above. > > Researching and testing further, it appears that the "bg" option is almost entirely > what we want. > > I was able to successfully achieve what I wanted with the following in fstab(5): > > bogus:/bogus /bogus nfs tcp,rw,nosuid,bg,late 0 0 > > AND adding to /etc/hosts: > > 128.0.0.1 bogus > > A timeout occurs attempting to connect to the system named "bogus" and upon > failure, mount_nfs(8) properly daemon(3)izes into the background, re- > attempting every 60 seconds to mount the volume. > > However, if I take out the /etc/hosts entry shown above (making the name > unresolvable), mount_nfs(8) will this time exit immediately with error status > rather than adhering to the "bg" option (which, for all intents and purposes, just > because the netid for the host isn't accessible at the time, doesn't mean it won't > be in 60 seconds -- thus justifying the logic that the "bg" option should apply even > when the netid can't be obtained, if not especially-so). > > I propose the following [UNTESTED] patch, which tries to make remote-errors > non-fatal to a filesystem marked as "bg". > > ========== BEGIN PATCH EXCERPT ========== > --- sbin/mount_nfs/mount_nfs.c.orig Fri Dec 2 00:46:44 2011 > +++ sbin/mount_nfs/mount_nfs.c Fri Dec 2 01:20:38 2011 > @@ -803,9 +803,17 @@ getnfsargs(char *spec, struct iovec **io > if (ret == TRYRET_SUCCESS) > break; > > - /* Exit if all errors were local. */ > - if (!remoteerr) > - exit(1); > + if ((opflags & (BGRND | ISBGRND)) == BGRND) { > + warnx("Cannot immediately mount %s:%s, backgrounding", > + hostp, spec); > + opflags |= ISBGRND; > + if (daemon(0, 0) != 0) > + err(1, "daemon"); > + } else { > + /* Exit if all errors were local. */ > + if (!remoteerr) > + exit(1); > + } > > /* > * If retrycnt == 0, we are to keep retrying forever. > @@ -814,13 +822,6 @@ getnfsargs(char *spec, struct iovec **io > if (retrycnt != 0 && --retrycnt == 0) > exit(1); > > - if ((opflags & (BGRND | ISBGRND)) == BGRND) { > - warnx("Cannot immediately mount %s:%s, backgrounding", > - hostp, spec); > - opflags |= ISBGRND; > - if (daemon(0, 0) != 0) > - err(1, "daemon"); > - } > sleep(60); > } > freeaddrinfo(ai_nfs); > ========== END PATCH EXCERPT ========== > I'm still interested in feedback on the above patch. Determining if we can reach consensus that the "bg" option should be applied even when the hostid can't be resolved, not just when the connection times-out. However, for the immediate remedy, we've generated the following [TESTED] patch (which merely allows /etc/rc.d/mountlate to be disabled via rc.conf(5) -- achieving the goal of making it impossible for ANY network-based filesystems to drop the system into single-user mode on boot)... NOTE: Patch is up-to-date, generated against HEAD, cvsup'd on December 2nd, 2011 (today). ========== BEGIN PATCH EXCERPT ========== --- etc/defaults/rc.conf.orig Fri Dec 2 11:21:08 2011 +++ etc/defaults/rc.conf Fri Dec 2 11:22:31 2011 @@ -93,6 +93,7 @@ netfs_types="nfs:NFS oldnfs:OLDNFS smbfs:SMB portalfs:PORTAL nwfs:NWFS" # Net filesystems. extra_netfs_types="NO" # List of network extra filesystem types for delayed # mount at startup (or NO). +mountlate_enable="YES" # Mount critical late/remaining filesystems in fstab(5) ############################################################## ### Network configuration sub-section ###################### --- etc/rc.d/mountlate.orig Fri Dec 2 11:19:51 2011 +++ etc/rc.d/mountlate Fri Dec 2 11:20:28 2011 @@ -11,6 +11,7 @@ . /etc/rc.subr name="mountlate" +rcvar="`set_rcvar`" start_cmd="mountlate_start" stop_cmd=":" ========== END PATCH EXCERPT ========== NOTE: After applying the above patch, we simply add ``mountlate_enable="NO"'' to rc.conf(5) -- and voila! NFS/SMBFS/other network filesystems are no longer critical to boot into multi-user mode (if they fail, they fail; the system eventually arrives in multi-user mode where we can service it remotely if-necessary). Regarding the above patch, it seems like a good idea to apply this to HEAD. Can anyone think of any reason that the above patch is a bad idea for the HEAD of FreeBSD? or on the flip-side, does anybody else second the idea that this should be applied? -- Devin > > Other comments on responses to initial situation below. > > > > More detailed analysis of your situation follows. > > > > On 12/01/2011 20:34, Devin Teske wrote: > > > Hi -RC@, Julian, Poul, and Ken, > > > > > > We need your help on FreeBSD-8.1! > > > > > > Please read the following dossier on our issue with simply > > > attempting to add a single NFS mount to fstab(5) ***without*** the > > > side-effect of rebooting into single-user mode should that mount > > > fail for ANY reason during > > boot. > > > > > > FULL-DISCLOSURE: We've already tried marking the filesystem as "late" > > > and/or "bg" to no avail. We've traced the problem down to a possible > > > bug in either > > > mount(8) or the `/etc/rc.d/mountlate' boot-script. Need confirmation > > > that this is a bug, OR a work-around to eliminate the numerous > > > edge-cases where we can reliably cause the system to boot into > > > single-user > > mode. > > > > I don't think it's a bug in either. > > You may be right. More below. > > > > > > > Corollary: > > > > > > Having a workstation 3000+ miles away in India reboot into > > > single-user mode simply because of a momentary network hiccup (or > > > any other situation that could cause failure of the NFS mount) at > > > boot is what we're trying to avoid. That is to explain, avoiding the > > > situation where a system that is physically afar from becoming > > > permanently unresponsive, requiring significant expenditure/effort to rectify. > > > > If you're administrating a remote system it's reasonable to assume > > that you have a serial console on it. That said, we're certainly not > > *trying* to break stuff willy- nilly. > > No serial console enabled on the workstations/desktops. > > > > > > > Possible Bug: > > > > > > As the system is booting, /etc/rc.d/mountcritremote attempts to > > > mount the filesystem. It fails. This is OK (because mountcritremote > > > does not return FAILURE status -- he returns SUCCESS and boot proceeds as- > expected). > > > > > > Later, /etc/rc.d/mountlate runs and attempts to mount it again. It > > > fails again except this time mountlate calls "stop_boot" after the > > > failure (dropping us to single-user mode). > > > > This the expected/desired behavior. > > Fair enough. > > > > > > > The "possible bug" comes into play in reading /etc/rc.d/mountlate > > > and finding out just how exactly it determines that it should have > > > been mounting this filesystem in the first place. > > > > > > mountlate calls "/sbin/mount -d -a -l" to determine if there are any "late" > > > filesystems to mount. > > > > No. The -a in there means that it's looking for *all* unmounted file > > systems, including those marked "late." > > Correct. > > > > > > In fact a key reason for the division between mountcritremote and > > mountlate is that circumstances on the system may have changed to > > allow things that failed the first time to be mounted, *in addition > > to* specifically marking certain entries "late" because we know that > > they cannot succeed until later in the boot. > > > > Right. > > > > > The filesystem is NOT marked as "late", but "/sbin/mount -d -a -l" > > > will still report it because it's not yet mounted. > > > > Right-O. > > > > All good. > -- > Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-freebsd-rc@FreeBSD.ORG Fri Dec 2 22:35:28 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 38792106564A; Fri, 2 Dec 2011 22:35:28 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id C6088160F83; Fri, 2 Dec 2011 22:35:27 +0000 (UTC) Message-ID: <4ED952AF.3060404@FreeBSD.org> Date: Fri, 02 Dec 2011 14:35:27 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Devin Teske References: <039201ccb0ab$b3db9470$1b92bd50$@fisglobal.com> <4ED862D6.9090807@FreeBSD.org> <039f01ccb0da$67b50f20$371f2d60$@fisglobal.com> In-Reply-To: <039f01ccb0da$67b50f20$371f2d60$@fisglobal.com> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org, 'Ken Smith' , 'Parker-Smith' , phk@freebsd.org, 'Julian Elischer' , Dave@FreeBSD.ORG Subject: Re: mount(8) bug? rc.d/mountlate bug? bug in both? 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, 02 Dec 2011 22:35:28 -0000 On 12/02/2011 02:08, Devin Teske wrote: > > >> -----Original Message----- >> From: Doug Barton [mailto:dougb@FreeBSD.org] >> Sent: Thursday, December 01, 2011 9:32 PM >> To: Devin Teske >> Cc: freebsd-rc@freebsd.org; Ken Smith; Parker-Smith; Dave@FreeBSD.ORG; >> phk@freebsd.org; 'Julian Elischer' >> Subject: Re: mount(8) bug? rc.d/mountlate bug? bug in both? >> >> Short answer, tag the mount(s) noauto in fstab, and mount them in > /etc/rc.local. >> > > That may be the simplest approach. > > However, we're looking more for a solution that involves keeping the NFS mounts > in fstab(5). Why said anything about moving the NFS mounts out of fstab? Did you actually ready what I wrote? Not to mention, you specifically asked for a solution that involved no code changes. Now you're proposing code changes. > I propose the following [UNTESTED] patch, which tries to make remote-errors > non-fatal to a filesystem marked as "bg". I would not be supportive of such a modification. An error is an error, and needs to be flagged as such. -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-rc@FreeBSD.ORG Fri Dec 2 23:44:19 2011 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 95B32106566C; Fri, 2 Dec 2011 23:44:19 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 5748D8FC12; Fri, 2 Dec 2011 23:44:18 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa05 [127.0.0.1]) by ltcfislmsgpa05.fnfis.com (8.14.4/8.14.4) with SMTP id pB2NhcEE009618; Fri, 2 Dec 2011 17:44:16 -0600 Received: from smtp.fisglobal.com ([10.132.206.31]) by ltcfislmsgpa05.fnfis.com with ESMTP id 11f8kq801s-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 02 Dec 2011 17:44:16 -0600 Received: from dtwin (10.14.152.48) by smtp.fisglobal.com (10.132.206.31) with Microsoft SMTP Server (TLS) id 14.1.323.3; Fri, 2 Dec 2011 17:44:16 -0600 From: Devin Teske To: "'Doug Barton'" References: <039201ccb0ab$b3db9470$1b92bd50$@fisglobal.com> <4ED862D6.9090807@FreeBSD.org> <039f01ccb0da$67b50f20$371f2d60$@fisglobal.com> <4ED952AF.3060404@FreeBSD.org> In-Reply-To: <4ED952AF.3060404@FreeBSD.org> Date: Fri, 2 Dec 2011 15:44:28 -0800 Message-ID: <044c01ccb14c$55b99bc0$012cd340$@fisglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIhmfk7Ve6JVGWlRGJXhdLF64R2wQHbinWoAbGk/9gCbCVefZTvlqTA Content-Language: en-us X-Originating-IP: [10.14.152.48] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2011-12-02_06:2011-12-02, 2011-12-02, 1970-01-01 signatures=0 Cc: freebsd-rc@freebsd.org, 'Ken Smith' , 'Parker-Smith' , phk@freebsd.org, 'Julian Elischer' , "Robison, Dave" Subject: RE: mount(8) bug? rc.d/mountlate bug? bug in both? 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, 02 Dec 2011 23:44:19 -0000 > -----Original Message----- > From: Doug Barton [mailto:dougb@FreeBSD.org] > Sent: Friday, December 02, 2011 2:35 PM > To: Devin Teske > Cc: freebsd-rc@freebsd.org; 'Ken Smith'; 'Parker-Smith'; phk@freebsd.org; > 'Julian Elischer'; Dave@FreeBSD.ORG > Subject: Re: mount(8) bug? rc.d/mountlate bug? bug in both? > > On 12/02/2011 02:08, Devin Teske wrote: > > > > > >> -----Original Message----- > >> From: Doug Barton [mailto:dougb@FreeBSD.org] > >> Sent: Thursday, December 01, 2011 9:32 PM > >> To: Devin Teske > >> Cc: freebsd-rc@freebsd.org; Ken Smith; Parker-Smith; > >> Dave@FreeBSD.ORG; phk@freebsd.org; 'Julian Elischer' > >> Subject: Re: mount(8) bug? rc.d/mountlate bug? bug in both? > >> > >> Short answer, tag the mount(s) noauto in fstab, and mount them in > > /etc/rc.local. > >> > > > > That may be the simplest approach. > > > > However, we're looking more for a solution that involves keeping the > > NFS mounts in fstab(5). > > Why said anything about moving the NFS mounts out of fstab? s/mounts in fstab(5)/mounting logic entirely contained within fstab(5)/ > Not to mention, you specifically asked for a solution that involved no code > changes. Now you're proposing code changes. You expect everybody that asks questions to wait indefinitely for an answer and do nothing in the mean time? What a sad world. > > I propose the following [UNTESTED] patch, which tries to make > > remote-errors non-fatal to a filesystem marked as "bg". > > I would not be supportive of such a modification. An error is an error, and needs > to be flagged as such. An error is an error except when the code treats errors of different types differently (which it currently does). Currently right-now, as we speak, mount_nfs(8) is considering local errors differently than remote errors when it comes to NFS filesystems marked with the "bg" option. My patch proposes that remote errors and local errors be treated the same when "bg" is passed (which currently, remote errors are fatal while local errors are not). You seem to contradict yourself (just sayin'). -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-freebsd-rc@FreeBSD.ORG Fri Dec 2 23:55:30 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 4DB29106564A; Fri, 2 Dec 2011 23:55:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id AD066150E28; Fri, 2 Dec 2011 23:55:28 +0000 (UTC) Message-ID: <4ED96570.4070302@FreeBSD.org> Date: Fri, 02 Dec 2011 15:55:28 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Devin Teske References: <039201ccb0ab$b3db9470$1b92bd50$@fisglobal.com> <4ED862D6.9090807@FreeBSD.org> <039f01ccb0da$67b50f20$371f2d60$@fisglobal.com> <4ED952AF.3060404@FreeBSD.org> <044c01ccb14c$55b99bc0$012cd340$@fisglobal.com> In-Reply-To: <044c01ccb14c$55b99bc0$012cd340$@fisglobal.com> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org, 'Ken Smith' , 'Parker-Smith' , phk@freebsd.org, 'Julian Elischer' , "Robison, Dave" Subject: Re: mount(8) bug? rc.d/mountlate bug? bug in both? 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, 02 Dec 2011 23:55:30 -0000 On 12/02/2011 15:44, Devin Teske wrote: >>>> Short answer, tag the mount(s) noauto in fstab, and mount them in >>> /etc/rc.local. >>>> >>> >>> That may be the simplest approach. >>> >>> However, we're looking more for a solution that involves keeping the >>> NFS mounts in fstab(5). >> >> Why said anything about moving the NFS mounts out of fstab? > > s/mounts in fstab(5)/mounting logic entirely contained within fstab(5)/ /etc/fstab is just a configuration file. The actual mounting of stuff happens elsewhere. My suggestion is to move the actual mounting of stuff from one rc file to another, a solution which will completely meet your needs without changing anything in the base. The fact that you're rejecting the simple solution indicates to me pretty clearly that I don't want to be involved further. >> Not to mention, you specifically asked for a solution that involved no code >> changes. Now you're proposing code changes. > > You expect everybody that asks questions to wait indefinitely for an answer and > do nothing in the mean time? What a sad world. Indefinitely? I answered your initial post less than an hour after you posted it. Doug -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-rc@FreeBSD.ORG Sat Dec 3 01:05:48 2011 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 430E91065670; Sat, 3 Dec 2011 01:05:48 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 048888FC08; Sat, 3 Dec 2011 01:05:47 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa03 [127.0.0.1]) by ltcfislmsgpa03.fnfis.com (8.14.4/8.14.4) with SMTP id pB30PeSV001457; Fri, 2 Dec 2011 19:05:46 -0600 Received: from smtp.fisglobal.com ([10.132.206.31]) by ltcfislmsgpa03.fnfis.com with ESMTP id 11f93s82px-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 02 Dec 2011 19:05:46 -0600 Received: from dtwin (10.14.152.48) by smtp.fisglobal.com (10.132.206.31) with Microsoft SMTP Server (TLS) id 14.1.323.3; Fri, 2 Dec 2011 19:05:46 -0600 From: Devin Teske To: "'Doug Barton'" References: <039201ccb0ab$b3db9470$1b92bd50$@fisglobal.com> <4ED862D6.9090807@FreeBSD.org> <039f01ccb0da$67b50f20$371f2d60$@fisglobal.com> <4ED952AF.3060404@FreeBSD.org> <044c01ccb14c$55b99bc0$012cd340$@fisglobal.com> <4ED96570.4070302@FreeBSD.org> In-Reply-To: <4ED96570.4070302@FreeBSD.org> Date: Fri, 2 Dec 2011 17:05:58 -0800 Message-ID: <045101ccb157$b85dd510$29197f30$@fisglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIhmfk7Ve6JVGWlRGJXhdLF64R2wQHbinWoAbGk/9gCbCVefQH9N6nSAhXIaViUzxeeYA== Content-Language: en-us X-Originating-IP: [10.14.152.48] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2011-12-02_06:2011-12-02, 2011-12-02, 1970-01-01 signatures=0 Cc: freebsd-rc@freebsd.org, 'Ken Smith' , 'Parker-Smith' , phk@freebsd.org, 'Julian Elischer' , "'Robison, Dave'" Subject: RE: mount(8) bug? rc.d/mountlate bug? bug in both? 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, 03 Dec 2011 01:05:48 -0000 > -----Original Message----- > From: Doug Barton [mailto:dougb@FreeBSD.org] > Sent: Friday, December 02, 2011 3:55 PM > To: Devin Teske > Cc: freebsd-rc@freebsd.org; 'Ken Smith'; 'Parker-Smith'; phk@freebsd.org; > 'Julian Elischer'; Robison, Dave > Subject: Re: mount(8) bug? rc.d/mountlate bug? bug in both? > > On 12/02/2011 15:44, Devin Teske wrote: > > >>>> Short answer, tag the mount(s) noauto in fstab, and mount them in > >>> /etc/rc.local. > >>>> > >>> > >>> That may be the simplest approach. > >>> > >>> However, we're looking more for a solution that involves keeping the > >>> NFS mounts in fstab(5). > >> > >> Why said anything about moving the NFS mounts out of fstab? > > > > s/mounts in fstab(5)/mounting logic entirely contained within > > fstab(5)/ > > /etc/fstab is just a configuration file. The actual mounting of stuff happens > elsewhere. My suggestion is to move the actual mounting of stuff from one rc file > to another, a solution which will completely meet your needs without changing > anything in the base. The fact that you're rejecting the simple solution indicates > to me pretty clearly that I don't want to be involved further. > > >> Not to mention, you specifically asked for a solution that involved > >> no code changes. Now you're proposing code changes. > > > > You expect everybody that asks questions to wait indefinitely for an > > answer and do nothing in the mean time? What a sad world. > > Indefinitely? I answered your initial post less than an hour after you posted it. > Tea in china? Whatever dude. -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.