LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 05-30-2005, 07:55 AM   #1
xoros
Member
 
Registered: Jun 2003
Posts: 45

Rep: Reputation: 15
where to put this code?


I need to get cardbus working on an hp zv5000.... I read you need to use this code, but I have a debian install and no rc.local file. where does it go??

Code:
[~] > cat etc/rc.local
# Speed up the disk already! 
/sbin/hdparm -c 1 -d 1 /dev/hda

# Flip the bits for cardbus to work
setpci -s 0:a.0 SUBORDINATE_BUS=0A

Thanks for any help, would be greatly appreciated.
 
Old 05-30-2005, 08:03 AM   #2
xoros
Member
 
Registered: Jun 2003
Posts: 45

Original Poster
Rep: Reputation: 15
I found this page that seems to be of help.....

http://www.plope.com/Members/chrism/...rc_local_equiv

Has anyone else done that?
 
Old 05-30-2005, 09:10 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
It depends on the distribution, but I'd say: at the end of /etc/rc.d/rc.local

Yves.
 
Old 05-30-2005, 09:14 AM   #4
xoros
Member
 
Registered: Jun 2003
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by theYinYeti
It depends on the distribution, but I'd say: at the end of /etc/rc.d/rc.local

Yves.
As I said though, my Debian install has no rc.local.

Here to quote from the link I posted:

Quote:
In many distributions you can add commands to run certain programs at the end of the boot process after all system services have been started into the /etc/rc.d/rc.local file, however there is no such file in a Debian system. Here is the way to accomplish the same thing the debian way:

Last edited by xoros; 05-30-2005 at 09:16 AM.
 
Old 05-30-2005, 09:16 AM   #5
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Yes, but (I don't know Debian) often, when a file is absent, creating it is enough, because the caller script has code like this:
if [ -x /path/to/child ]; then . /path/to/child; fi

As I said, though, I don't know Debian...
Yves.
 
Old 05-30-2005, 09:19 AM   #6
xoros
Member
 
Registered: Jun 2003
Posts: 45

Original Poster
Rep: Reputation: 15
Just nevermind then I will try what it says in the link. Just curious if there is anyone here with Debian experience.
 
Old 05-30-2005, 09:56 AM   #7
xoros
Member
 
Registered: Jun 2003
Posts: 45

Original Poster
Rep: Reputation: 15
Well it didn't work. I got the whole 'local' file set up, but I keep seeing under lspci -vv:

0000:02:04 1 Cardbus bridge Texas Instruments: unknown device ac54 (rev 01)

 
Old 05-30-2005, 06:30 PM   #8
titetanium
Member
 
Registered: Mar 2004
Distribution: debian testing/unstable, devuan, raspberrypi OS
Posts: 68

Rep: Reputation: 16
Try putting the script in /etc/rcS.d, prefaced with an "S" followed by a number.
Example: /etc/rcS.d/S20your_script

Btw, Debian doesn't use rc.local. It uses rcS.d instead for all global startup scripts.

HTH,

Durand
 
Old 05-30-2005, 07:49 PM   #9
xoros
Member
 
Registered: Jun 2003
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by titetanium
Try putting the script in /etc/rcS.d, prefaced with an "S" followed by a number.
Example: /etc/rcS.d/S20your_script

Btw, Debian doesn't use rc.local. It uses rcS.d instead for all global startup scripts.

HTH,

Durand
After creating file... then:

update-rcS.d S20your_script defaults 80 ?

or just put the script in there?

Thanks.

Last edited by xoros; 05-30-2005 at 08:02 PM.
 
Old 05-30-2005, 08:16 PM   #10
titetanium
Member
 
Registered: Mar 2004
Distribution: debian testing/unstable, devuan, raspberrypi OS
Posts: 68

Rep: Reputation: 16
Actually, you could create the script and then copy it to /etc/init.d, then cd to rcS.d.
Next make a symlink
Code:
ln -s ../init.d/yourscript S20yourscript
.

Reboot to see if it takes effect. You might have to adjust the starting number, the higher it is, the earlier it starts.

You could also alternatively use the update-rc.d command, but first the script needs to be located in /etc/init.d
for that command to create the symlinks for you.

P.S. I suggested 20 because most programs start with that number, but you can make it start earlier or later if
you wish, depending on how fast you want your system to boot.


HTH,

Durand
 
Old 05-30-2005, 09:34 PM   #11
xoros
Member
 
Registered: Jun 2003
Posts: 45

Original Poster
Rep: Reputation: 15
I read that rcS.d scripts get executed first so probably better to put it in there first?

I am not sure now how to de-link the file I made in /etc/init.d/ (I used update-rc.d to link it)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
small syntax problem with C code (implemented in Code Composer Studio) illiniguy3043 Programming 6 01-07-2008 03:14 AM
import fail to put code to the repository powah Linux - Software 0 10-25-2005 03:09 PM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 02:37 AM
How do I put root Password from code in sudo ? rhawi Programming 8 06-18-2004 01:49 PM
Open Firmware code for booting OS from SATA : sample code available somewhere ? drsparikh Linux - Hardware 0 03-12-2004 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 02:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration