LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to call a script from a system startup script? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-call-a-script-from-a-system-startup-script-378416/)

jonatito 10-30-2005 04:32 PM

How to call a script from a system startup script?
 
I have many problems with my TNT2's configuration under SUSE 10.0 and after answer in the nvidia forum i must follow the instructions:

Quote:

... To solve your problem with 1.0-7174, you can e.g. extract the .run package and copy the makedevices.sh script from the usr/src/nv directory (relative to the newly created directory) to /usr/bin and call it from a system startup script. ...
OK, but how can i call the script from a system startup script?

i say you what i did:
[list=1][*]i've copied the file in /usr/bin[*]i've created a symbolic link to this file in the /etc/rc3.d (and 5) directories with the name S07makedevices.sh[/list=1]

it's that alright? i'm doing ok? or i have to edit any file??

thanks

btmiller 10-30-2005 05:11 PM

Usually the scripts in /etc/rc3.d will link to scripts in /etc/init.d or /etc/rc.d/init.d, but it doesn't matter too much, just so long as the script can be called with a "start" argument and "stop" argument for the S and K links respectively. You probably ought to make the corresponding K symlink if there's any shutdown that needs to be done (some stuff neefds this, some doesn't).

If the issiue is with creating device nodes, a better idea is to modify your uden configuration to make sure the device nodes are created dynamically on boot, but this method will work too.

jonatito 11-04-2005 01:28 PM

thanks btmiller, but that wasn't a solution because makedevices.sh isn't a sysV script (whatever that means). The correct solution is to add a line in boot.local to call the script.

btmiller 11-04-2005 08:01 PM

That why I said you had to be able to call it with a "start" or "stop" argument (like a System V initialization script) if you wanted to do things that way. Your way, of course, is correct in this case.

khaleel5000 11-04-2005 10:23 PM

help me
 
hey jonatito I have an N-VIDIA RIVA TNT2 card can you tell me where you got drivers for it ? and how to istall ? i downloaded its drivers from online update now my linux loads but when the time of showing the login screen comes the screen flashes and goes blank can you help me out with that 2?

debianmike 11-04-2005 11:06 PM

can't you also put stuff in /etc/rc.d/rc.local to have them run at bootup?

btmiller 11-05-2005 02:05 AM

It depends on the distribution ... some set up an rc.local script to run after the other init scripts, and a few don't (Debian at least didn't have one by default, or at least it didn't used to). It's easy anough to add one though (by adding the S99local symlink in the /etc/rc.d/rc3.d and/or /etc/rc.d/rc5.d directory).

jonatito 11-11-2005 09:40 PM

Khaleel5000:
-download the version 7174 or older (because this was the last package that supported TNT2)
-enter in runlevel 3.
- rmmod nvidia
- sh driver-1.0-7174-pkg1.sh -q
And now you must setup the /etc/X11/xorg.conf file (If you have Xfree86 the file is /etc/X11/xfree86.conf or something similar always in the same folder)

in section "module"
add the line Load "glx"
erase (or add # in the first place of the line) the lines Load "GLCore" and Load "dri"

in section "devices"
add the line Driver "nvidia"
erase (or #) the line Driver "nv"

it's all.
You can visit the nvidia forums at www.nvnews.net if you have any question.
The drivers are in www.nvidia.com, else you can find them via google.


All times are GMT -5. The time now is 10:45 AM.