I didn't like the idea of seti writing files to /opt. Here's a simple patch that uses the SETIATHOME_DIR conf.d variable slightly differently. This also adds a necessary "need net" depend. I would also change the default conf.d/setiathome file to set SETIATHOME_DIR to /var/lib/setiathome (seems most reasonable). ---------------------------------- --- setiathome.orig 2002-10-21 19:06:52.000000000 -0700 +++ setiathome 2002-10-21 19:11:22.000000000 -0700 @@ -1,17 +1,21 @@ #!/sbin/runscript +depend() { + need net +} + checkconfig() { if [ ! -e ${SETIATHOME_DIR} ] then einfo "Creating ${SETIATHOME_DIR}" - mkdir ${SETIATHOME_DIR} + mkdir -p ${SETIATHOME_DIR} fi if [ ! -e ${SETIATHOME_DIR}/user_info.sah ] then einfo "Setting up SETI@home for the first time" cd ${SETIATHOME_DIR} - ./setiathome -login + /opt/setiathome/setiathome -login fi } @@ -20,7 +24,7 @@ ebegin "Starting SETI@home" cd ${SETIATHOME_DIR} - ./setiathome ${SETIATHOME_OPTIONS} >&/dev/null& + /opt/setiathome/setiathome ${SETIATHOME_OPTIONS} >&/dev/null& eend $? } ----------------------------------
hmm, i like the idea of using /var/lib/setiathome/ ... i was in the process of rewriting the seti@home stuff anyways ...
Created attachment 7963 [details] reworked setiathome rc script to allow configurable number of threads This is a whole new rc script reworked to allow a configurable number of threads. It builds upon the cpu-detection magic. The reason for this is that on clusters, the number of processors is still far lower than what one might want to run. This new rc script basically adds a SETIATHOME_THREADS variable in /etc/conf.d/setiathome. It also fixes the path of the setiathome binary to not expect local directory. So a new default /etc/conf.d/setiathome file would look like this: # Config file for /etc/init.d/setiathome # specify the number of setiathome processes to start SETIATHOME_THREADS="10" # set up any options you want for setiathome here # for more info, `setiathome -h` SETIATHOME_OPTIONS="-nice 19" # this is the directory where setiathome's data files will be stored SETIATHOME_DIR=/var/lib/setiathome
oops! sorry, the default SETIATHOME_THREADS should be 1 or commented out -- not 10 :-)
zetagrid and dnetc are also in /opt please leave it there
The point of this is not to move seti out of /opt -- just the run-time files seti generates while it's processing. It is just not good form to write to a directory like /opt or /usr while running (many sysadmins strive to keep those directories as though they were mounted on read-only media). In fact the rc script assumes the setiathome binary is still installed as /opt/setiathome/setiathome -- just the location of all the *.sah files has been moved to /var/lib/setiathome.
sorry, we're leaving it in opt, i know it suckors, but its the way we do it with zetagrid and others... fixed the need net
I'm sorry? Did someone not read my previous comment? I am not proposing to move seti out of /opt. I have no problems having it in /opt. I just think its poor form (and IIRC a violation of FHS) to have the changeable data files in a directory that can potentially be mounted read-only! Therefore what I have posted was a very straightforward fix to just change the location of the *.sah files. Please reconsider.
post a fix against the rc-script i just commited and i'll apply it =)
Created attachment 10815 [details, diff] patch for the current setiathome init script ahoy! here it be matey! this allows for the data files to be in any configurable place (the to-be-posted-next conf file patch puts them in /var/lib/setiathome by default). it also allows a configurable number of threads (for those of us with clusters can specify this to be higher than the number of physical processes. the aforementioned-upcoming-conf file patch defaults this to 1).
Created attachment 10816 [details, diff] patch for the current setiathome init script conf file and the promised conf-file patch.
any chance of getting this re-opened so it doesn't fall through the cracks?
asdfasdf
so whats the deal, should i aply both of these patches?
yes, if you deem appropriate. one patch is for the rc script itself and the second is for the /etc/conf.d/setiathome file.
Commited to 3.08-r1.