Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2001 15:57:47 -0300
From:      Filipe Brandenburger <filipe@procergs.rs.gov.br>
To:        Devin Smith <devin-freebsdquestions@rintrah.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Doing "batch" updates in single-user mode
Message-ID:  <5.1.0.14.1.20011212155028.00a64e68@imap.procergs.rs.gov.br>
In-Reply-To: <20011212123632.A30468@tharmas.rintrah.org>
References:  <5.1.0.14.1.20011212135123.00a64e68@imap.procergs.rs.gov.br> <5.1.0.14.1.20011212100146.00a6f420@imap.procergs.rs.gov.br> <5.1.0.14.1.20011212100146.00a6f420@imap.procergs.rs.gov.br> <20011212103624.A10754@tharmas.rintrah.org> <5.1.0.14.1.20011212135123.00a64e68@imap.procergs.rs.gov.br>

next in thread | previous in thread | raw e-mail | index | archive | help
At 12/12/2001 14:36, Devin Smith wrote:
>Maybe try
>
>#!/bin/sh
>init 1 && touch /root/I_was_here
>exit
>
>
>then run with exec ./scriptname.sh

Well, didn't work either. As I'm seeing it, when I run "init 1", it kills 
all running processes. Then, when all of them are killed, it opens another 
shell (that's when it asks which shell you want or /bin/sh). When that 
shell exits, then it's when it gets back to multi-user mode.

As I see it, the way to do it would be telling init (somehow) that it would 
have to open another shell that is not /bin/sh in a non-interactive way, so 
that you could place a script in /root/update_single_user.sh, and then when 
the script would go to the single user mode, it would run this script, and 
when this script finishes, it would get back to multi-user mode.

Filipe


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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