From owner-freebsd-questions@freebsd.org Fri Jan 31 18:50:50 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 863FC1E920E for ; Fri, 31 Jan 2020 18:50:50 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) (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 488RBJ5VSSz44qC for ; Fri, 31 Jan 2020 18:50:48 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([178.12.42.24]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPA (Nemesis) id 1MoOpq-1jLtUU1rSa-00oluC; Fri, 31 Jan 2020 19:50:38 +0100 Date: Fri, 31 Jan 2020 19:50:37 +0100 From: Polytropon To: Andrea Venturoli Cc: freebsd-questions@freebsd.org, "Steve O'Hara-Smith" , Polytropon Subject: Re: Back up to disk automatically when disk is inserted Message-Id: <20200131195037.3c789345.freebsd@edvax.de> In-Reply-To: <5f17ee88-87d1-702f-dd34-3cf8d38a6494@netfence.it> References: <12be8560-91ac-f800-4ca2-84175227d280@netfence.it> <20200130142046.c1dc5c57.freebsd@edvax.de> <20200130145320.dbee4bc33ac4d6e7cf73604c@sohara.org> <5f17ee88-87d1-702f-dd34-3cf8d38a6494@netfence.it> 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:b8BmKDeoLWSNwMMxlsC6U8bkt082U4SBYNoRtwE32KzAQnq6CLW unj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cGpo/XUopPHRPZswSzXSxyiifCypKtqQqr4eZGflBgqh X-Rspamd-Queue-Id: 488RBJ5VSSz44qC X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.17.24) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [3.03 / 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)[]; FROM_EQ_ENVFROM(0.00)[]; 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:+]; RECEIVED_SPAMHAUS_PBL(0.00)[24.42.12.178.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.52)[-0.523,0]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.997,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[24.17.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.16)[ip: (-0.33), ipnet: 212.227.0.0/16(-1.12), asn: 8560(2.25), country: DE(-0.02)] 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: Fri, 31 Jan 2020 18:50:50 -0000 On Fri, 31 Jan 2020 15:36:19 +0100, Andrea Venturoli wrote: > On 2020-01-30 15:53, Steve O'Hara-Smith wrote: > > On Thu, 30 Jan 2020 14:20:46 +0100 > > Polytropon wrote: > > > >> On Thu, 30 Jan 2020 09:10:35 +0100, Andrea Venturoli wrote: > >>> Failing this, is there some way for my script to check whether the boot > >>> process has already ended? > >> > >> You could do the following: Check /var/log/messages and look > >> for the _timestamps_ of > > > > > > > > Slightly less inelegant, compare the inode change timestamp of the > > device entry with the last reboot time. > > > > In shell ls -lc /dev/whatsit and last reboot will get the data - if > > they differ by more than a minute it wasn't there at boot. > > > > Thanks for all the suggestions. > > > > Is there no way to check whether the "login:" prompt is ready? > Would "ps ax|grep getty" work? Yes, for virtual terminal logins this should work. If you want to know if a user has been logged in, parsing output of "who" or "w" or checking ps output for login shells would be the next step. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...