Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jan 2020 19:50:37 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Andrea Venturoli <ml@netfence.it>
Cc:        freebsd-questions@freebsd.org, "Steve O'Hara-Smith" <steve@sohara.org>, Polytropon <freebsd@edvax.de>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <freebsd@edvax.de> 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
> > 
> > <snip>
> > 
> > 	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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200131195037.3c789345.freebsd>