Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems with initscript and xerces
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Mange123
n00b
n00b


Joined: 27 Jul 2009
Posts: 4

PostPosted: Wed May 18, 2011 9:41 am    Post subject: Problems with initscript and xerces Reply with quote

I have a program that uses xerces for some XML-parsing. When the computer is restarted a tmux is created and 3 instances of this program is started in 3 different "tmux-windows". This is done in a initscript in /etc/init.d . The program uses NVidia cards and Cuda. The program works just fine when I start it normally manually, but when I use this script I get some errors that I haven't been able to resolve. The errormessage looks like this:

Code:

Could not open catalog:
 XercesMessages_en_US.cat
 or XercesMessages_en_US.cat
Cannot load message domain


The script looks like this:

Code:

depend() {
        need net
}

start() {

        cards=$(($(lspci | grep -i NVIDIA | grep "VGA compatible controller" | wc -l) +  $(lspci | grep -i NVIDIA | grep "3D controller" | wc -l)))
        for i in $(seq 0 $cards); do
                if [ $i -eq $cards ]; then
                        mknod -m 666 /dev/nvidiactl c 195 255
                else
                        mknod -m 666 /dev/nvidia$i  c 195  $i
                fi
        done

        #Drop privileges to quantify user. Go to home, and start tmux. Repeat for x-1 number of cards
        su quantify -c "cd ~/Gentrader0/CudaRegression && tmux new -d -s gpuspace './GPRun Process'"
        if [ "$cards" -gt 1 ]; then
                for j in $(seq 1 $cards); do
                        su quantify -c "cd ~/Gentrader$j/CudaRegression && tmux new-window -t gpuspace:$j './GPRun Process'"
                done
        fi
}


So I guess I need to do something explicitly to get it to work when I start it via the init-script. I need to set some Path-variable or something? Anyone can give me any hints how I can solve this issue?
Back to top
View user's profile Send private message
oblivion_vr
n00b
n00b


Joined: 19 May 2013
Posts: 22

PostPosted: Sun Aug 10, 2014 8:06 pm    Post subject: Re: Problems with initscript and xerces Reply with quote

Try after re-starting your system. It worked for me that way. Not sure why env-update didn't work for me.


Mange123 wrote:
I have a program that uses xerces for some XML-parsing. When the computer is restarted a tmux is created and 3 instances of this program is started in 3 different "tmux-windows". This is done in a initscript in /etc/init.d . The program uses NVidia cards and Cuda. The program works just fine when I start it normally manually, but when I use this script I get some errors that I haven't been able to resolve. The errormessage looks like this:

Code:

Could not open catalog:
 XercesMessages_en_US.cat
 or XercesMessages_en_US.cat
Cannot load message domain


The script looks like this:

Code:

depend() {
        need net
}

start() {

        cards=$(($(lspci | grep -i NVIDIA | grep "VGA compatible controller" | wc -l) +  $(lspci | grep -i NVIDIA | grep "3D controller" | wc -l)))
        for i in $(seq 0 $cards); do
                if [ $i -eq $cards ]; then
                        mknod -m 666 /dev/nvidiactl c 195 255
                else
                        mknod -m 666 /dev/nvidia$i  c 195  $i
                fi
        done

        #Drop privileges to quantify user. Go to home, and start tmux. Repeat for x-1 number of cards
        su quantify -c "cd ~/Gentrader0/CudaRegression && tmux new -d -s gpuspace './GPRun Process'"
        if [ "$cards" -gt 1 ]; then
                for j in $(seq 1 $cards); do
                        su quantify -c "cd ~/Gentrader$j/CudaRegression && tmux new-window -t gpuspace:$j './GPRun Process'"
                done
        fi
}


So I guess I need to do something explicitly to get it to work when I start it via the init-script. I need to set some Path-variable or something? Anyone can give me any hints how I can solve this issue?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum