First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 9467
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Daniel Ahlberg (RETIRED) <aliz@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Max Kalika (RETIRED) <max@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
setiathome reworked setiathome rc script to allow configurable number of threads text/plain Max Kalika (RETIRED) 2003-02-05 16:09 0000 1.56 KB Details
seti-init.d-r1.alt-dir_and_conf-threads.patch patch for the current setiathome init script patch Max Kalika (RETIRED) 2003-04-17 21:06 0000 2.78 KB Details | Diff
seti-conf.d-r1.alt-dir_and_conf-threads.patch patch for the current setiathome init script conf file patch Max Kalika (RETIRED) 2003-04-17 21:07 0000 596 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 9467 depends on: 8600 Show dependency tree
Show dependency graph
Bug 9467 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2002-10-21 21:28 0000
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 $?
 }
----------------------------------

------- Comment #1 From SpanKY 2002-10-21 22:08:17 0000 -------
hmm, i like the idea of using /var/lib/setiathome/ ...

i was in the process of rewriting the seti@home stuff anyways ...

------- Comment #2 From Max Kalika (RETIRED) 2003-02-05 16:09:07 0000 -------
Created an attachment (id=7963) [edit]
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

------- Comment #3 From Max Kalika (RETIRED) 2003-02-05 18:03:58 0000 -------
oops!  sorry, the default SETIATHOME_THREADS should be 1 or commented out --
not 
10 :-) 

------- Comment #4 From Martin Holzer (RETIRED) 2003-03-12 17:59:48 0000 -------
zetagrid and dnetc are also in /opt
please leave it there

------- Comment #5 From Max Kalika (RETIRED) 2003-03-12 18:15:57 0000 -------
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. 

------- Comment #6 From Seth Chandler 2003-04-17 18:33:00 0000 -------
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

------- Comment #7 From Max Kalika (RETIRED) 2003-04-17 19:54:17 0000 -------
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. 

------- Comment #8 From Seth Chandler 2003-04-17 20:19:44 0000 -------
post a fix against the rc-script i just commited and i'll apply it =) 

------- Comment #9 From Max Kalika (RETIRED) 2003-04-17 21:06:35 0000 -------
Created an attachment (id=10815) [edit]
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).

------- Comment #10 From Max Kalika (RETIRED) 2003-04-17 21:07:13 0000 -------
Created an attachment (id=10816) [edit]
patch for the current setiathome init script conf file

and the promised conf-file patch.

------- Comment #11 From Max Kalika (RETIRED) 2003-04-23 08:47:36 0000 -------
any chance of getting this re-opened so it doesn't fall through the cracks?

------- Comment #12 From Seth Chandler 2003-04-23 14:31:54 0000 -------
asdfasdf 
 

------- Comment #13 From Seth Chandler 2003-04-23 15:55:23 0000 -------
so whats the deal, should i aply both of these patches? 

------- Comment #14 From Max Kalika (RETIRED) 2003-04-23 16:01:58 0000 -------
yes, if you deem appropriate.  one patch is for the rc script itself and the
second is for 
the /etc/conf.d/setiathome file. 

------- Comment #15 From Daniel Ahlberg (RETIRED) 2003-05-04 09:36:48 0000 -------
Commited to 3.08-r1.

First Last Prev Next    No search results available      Search page      Enter new bug