NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Boot, write info to file, shutdown
On Wed, Aug 03, 2016 at 08:52:28AM +0000, Raymond Phillips wrote:
> I'd like to install NetBSD (amd64 in this case) onto a USB key so the portable system will:
>
> - boot as quickly as possible
> - run a shell script automatically as soon as it boots
> - print some information about the machine's hardware to a file
> - print a message to the console
> - shut down automatically
>
> all without human intervention.
There are various ways to do what you want. One quite simple is to replace
/sbin/init by a shell script that just does whatever you want.
Next (less drastic) way is to replace the script in /etc/rc by your own
script.
Or if you want some more background services, configure whatever services
you want (in rc.conf) and add your script to /etc/rc.local.
Martin
P.S.: see also: man 8 rc
Home |
Main Index |
Thread Index |
Old Index