From owner-freebsd-questions@freebsd.org Tue May 14 20:08:35 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BA6215972C5 for ; Tue, 14 May 2019 20:08:35 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DFE1582561 for ; Tue, 14 May 2019 20:08:33 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([188.103.173.136]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPA (Nemesis) id 1MsqIi-1gXrJB07RY-00tCo7; Tue, 14 May 2019 22:08:25 +0200 Date: Tue, 14 May 2019 22:08:24 +0200 From: Polytropon To: Per olof Ljungmark Cc: freebsd-questions@freebsd.org Subject: Re: rcorder - wait for tap0 Message-Id: <20190514220824.a4779bb2.freebsd@edvax.de> In-Reply-To: <63fe68c5-b85b-7d6d-a438-596ec8041f6b@nethead.se> References: <20190514182945.0ced24d4@gumby.homeunix.com> <20190514185340.0159358c@gumby.homeunix.com> <63fe68c5-b85b-7d6d-a438-596ec8041f6b@nethead.se> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:R2+bkefJjuqbkrEVzE0tSL2Tow+nt3ONUZ3mlQ8O4Pq/i4Dwzbk g5QVjBXRPrYa1u+XRdrbyD+yzdmBdVtGo2IqZl+wjxqvUfc22uOh3kvrk+4xMUXzhiXqVKJ egVRG4cCcND3G9Vjy4iv7wfJEmWROjY+8W1bQv0xGmtYo1LYqcvUj7Rqe6aCk1+9RrxfKM1 3IX5EJW5qSxKqyxpDS3CA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:4BWKrZcGGts=:A1K5U7HH/oFPQoma3ycc0Q T7A8Mm5VtfTmxCF+36jI2S5Nw1ltBxd9i+9nb0q4FKJwGUVxiY6HqmP/e3+aXcDgzcwK31zZl iTPP0H8ndjnGNgp1kgusVr2sxqAEuncK5lbZrCo4SXsBwLBSOO/64JMQAZKPQBfeBKd7QxFsc 8CmaoVPAOafeKWd9aQFAj6dbnDAdadKqnrtmcsJRXQutfY5vFdDzFbfU7T24d+bpsijWz0LiH b+SH7aifw4tINJU63FTowolnwQ+VQCPVWTzPRsS0CDG8mHEKHgDTyTGDtuheABhdiPIoqxWdY bKFGLZMCRa00d+93Gp0U2ElfeY06JMrpPfa8n01g7IZwaaCoYlNoBfNTk4FTVJlc2hVRes1is 2qqZnjk1kPRxvk8EeTB3L0eX992fFEX47G5ZSogkTp70NDro2XNY/ezRfBKpUGpWXZ9Wy2/b8 Ok6w+R9aIqzpSTo5xHj8XaT/CVvbni/VUkjXS8l2b8LM+pKm2y9xIj8MrslCjSs0BiqVwii6Z ngtzUWhd5Ec85dMFklEb0k/BiOnTuNkLig6Todt+gKlLl+I0p6eeAPTgT8+SMwsmryWMPT+VM mCSvf6jNnzWr/ML9eRQ6vLgPpClPvwPBbZNZSZqwBbOP7Qf0ZwiNZ9KECPzlvd4k4zrOzozKy tV9MM1+Lur/c90zUmvB04U36wpv+YAEzxZqDZchv4uNkOAkzby/MnlIPqBic8aRDKtxkzGLqH tUXCw2hMAkH8Ebgmf+APWTtOW1wAMhJo2iyjBloaF7d6HAltJW341zED3GE= X-Rspamd-Queue-Id: DFE1582561 X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [6.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; MX_GOOD(-0.01)[cached: mx00.schlund.de]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[136.173.103.188.zen.spamhaus.org : 127.0.0.11]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.98)[0.975,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.99)[0.987,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[133.126.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.65)[ip: (2.86), ipnet: 212.227.0.0/16(-1.50), asn: 8560(1.91), country: DE(-0.01)] X-Spam: Yes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 May 2019 20:08:35 -0000 On Tue, 14 May 2019 21:39:26 +0200, Per olof Ljungmark wrote: > On 2019-05-14 19:53, RW via freebsd-questions wrote: > > On Tue, 14 May 2019 18:29:45 +0100 > > RW wrote: > > > >> On Tue, 14 May 2019 08:49:52 +0200 > >> Per olof Ljungmark wrote: > >> > >>> Despite large amounts of cofee and time I cannot grasp how to make > >>> this happen. > >>> > >>> What I want is > >>> > >>> Boot -> start openvpn/tap0 configured -> start named -> start jails > >>> > >>> Because the jails uses tap0 of course they cannot start before tap0 > >>> is up, but this is what happens in the default configuration. > >>> > >>> Surely this cannot be unique? How did you do it? > >>> > >>> Preferrably without messing with rc.d scripts that gets overwritten > >>> when updated. > >> > >> You need an rc script in /usr/local/etc/rc.d with something like: > >> > >> > >> # PROVIDE: vpnwait > >> # REQUIRE: openvpn > >> # BEFORE: > > > > now I come to think about it openvpn runs after LOGIN, so either you > > have to put up with the order > > > > named, openvpn, jails > > > > or rewrite the openvpn script. > > > > What I did was to allow DNS to pass directly to one well-known server so > > lookups could happen before openvpn started. > > Thank you for your comments. > > Thing is named dies if tap0 is not up when it starts and as this is a > public named server it needs to be running after boot. > > Rewriting the provided rc scripts, they are part of the port and > requires work when updated. > > So, the conlusion is, fiddle with the ule/rc.d/ and prepare to fix them > after every update? No other way? There is another way, but it doesn't sound much better: You could use /etc/rc.local to implement the exact order in which you need to start the different services, without using their automatic startup (*_enable="YES" in combination with the /etc/rc.d/ and /usr/local/etc/rc.d/ scripts). Again, note that /etc/rc.local is not the _last_ thing executed at startup - other services might be started later. So if you need such a service to run _before_ something else, start it yourself from /etc/rc.local and prevent any further startup tries (or ignore the "service already running" messages). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...