Mike Gerdts wrote:
> Sometimes a runonce service needs to trigger a reboot.  It looks to me
> as though all runonce services will be running at the same time -
> making such a thing somewhat risky.  Is this something that you are
> intending to support?

First, note that this is something I just threw together this 
afternoon... it hasn't been deeply designed.

If a particular run-once had additional dependencies, presumably they 
could be specified for its instance.  Whether that'd let it reboot 
safely... maybe.  You'd really like to single-thread something that 
wants to reboot the system, so that nothing else is in the middle of 
doing its work.

>> sh -c "$RUN"
> 
> One of the things that I commonly need to run on first boot is an ELF
> executable.  Is there a reason to force a Bourne shell wrapper?  As
> currently implemented it could cause confusion for software targeting
> OpenSolaris and Solaris because /bin/sh in OpenSolaris 2008.05 is
> really ksh93.  This would mean that a Korn shell script tested on
> OpenSolaris will work just fine but will fail on Solaris 10.

I think you missed the "-c".  That means "Hey, shell, here is a command 
line.  Process it.".  What it means is that the command that you specify 
must be acceptable to the Bourne shell.  That command might well be the 
name of an ELF executable, or a perl script, or... whatever.

You could set $RUN to any of

        /opt/myapp/myprog
        /bin/rm -rf /
        echo hello
        echo hello > /etc/passwd
        echo $PATH

and they would all do sensible and obvious things.

Reply via email to