2004.03.25 Thu Hi, I have been influenced by Gerrit Pape's comments "why not think about eth0 as a service" and performing one-time system initializations with runit services, rather than various rc scripts. The attached patch to runit-1.0.1 recognizes the existence of a file named "myservice/once" in a service directory, to run the service one time. The file "once"--like "down"--is intended to be a file created by touch(1). As noted in the patch: # this patch modifies the "runsv" utility as follows: # # If the file "myservice/once" exists--and the file # "myservice/down" does not exist--runsv runs the # service once. # # The usual conventions for running the service once # are followed: # # * if the service is not running, start "./run" # # * if "./run" exits and "./finish" exists, # run "./finish" # # * if "./finish" exits, do not restart "./run" # # Note: no recognition is provided for the presence # of "myservice/log/once". # # # this patch also modifies the "runsvstat" utility such # that: # # If the service is down and the file "myservice/once" # exists--and the file "myservice/down" does not exist-- # then the output is: # # myservice: down 310 seconds (run once) # # # rationale: # # to permit the installation of "one-time" services # --such as for the purposes of system initialization-- # within the "runit" framework. # # see, for example, gerrit pape's "What is a service?" # musings in: # # http://smarden.org/pape/djb/daemontools/noinit.html # # similarly, felix von leitner's minit package recognizes # a "myservice/sync" file to provide one-time static # initialization services. # This patch is just a suggestion for discussion and consideration. I believe nothing has been done here to break existing deployments. In particular, no changes have been made in the specification or contents of supervise/status. If the facility were to be formally incorporated into the release, however, I am sure it would be done much better. Stay well! Wayne -- Wayne Marshall guinix international http://www.guinix.com/ "Computing Without Borders..."