LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-22-2004, 04:42 PM   #1
Agna
LQ Newbie
 
Registered: Mar 2004
Location: Suspended in Dusk
Distribution: ubuntu
Posts: 13

Rep: Reputation: 0
Making some commands run everytime I start Linux (Slack 9.1)


Well I finally solved my problem (after a week trying ) regarding my NIC and my ISP rules wich I can not post a link to the thread due to my low post count And I did it this way
Installed new NIC linux drivers, And then

ifconfig eth0 down
macchanger --m= NEW MAC adress
Ifconfig eth0 UP
dhcpcd eth0


now typing all that (I know ain't to much but still) every time I boot into linux its the most comfortable way to get net access to inet. So theres some way to do it? A script? And how can I do it, Maybe Using CRON? And if you can point me to a how to would be cool too

Thanx in advance

 
Old 03-22-2004, 04:44 PM   #2
aaa
Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
Put it in /etc/rc.d/rc.local
 
Old 03-22-2004, 10:24 PM   #3
Agna
LQ Newbie
 
Registered: Mar 2004
Location: Suspended in Dusk
Distribution: ubuntu
Posts: 13

Original Poster
Rep: Reputation: 0
ooops I found a problem, I edited the file and during th start up whe it trys to execute the macchange line it says "command not foun (or somthing pretty similar) and then everything stops. I think its cos Machchanger is a program I installed later and its not part of linux itself, the comand ifconfig hw to change the MAC adress can't change the mac adress on my NIC.
So now I need another idea on how to solve the problem starting up, since I can type but theres no bash, I mean I type and nothing happens. And any idea on how to solve the rc.local script?

If I boot with Slack CD2 I dont have startx, and I dont know how to edit the file since I see the HD but I cant navigete truh them.
 
Old 03-22-2004, 11:03 PM   #4
Pres
Member
 
Registered: Jun 2002
Location: Australia
Distribution: Slack 9.1
Posts: 232

Rep: Reputation: 30
Likely this is a PATH problem. Find out where your 'machchanger' binary lives (try 'whereis macchanger') and give the entire path explicitly in your script eg. /usr/local/share/applications ... just for example. You type in the path where it *really* lives .... it could just be a little spelling mistake too in your script - remember, case sensitivity. If the binary is all lower case, having an upper case 'M' will ruin things.
 
Old 03-22-2004, 11:27 PM   #5
Agna
LQ Newbie
 
Registered: Mar 2004
Location: Suspended in Dusk
Distribution: ubuntu
Posts: 13

Original Poster
Rep: Reputation: 0
ok thanx gonna try that tomorrow, now could you give me a tip in how to edit the file again? Im stuck I can't get into linux, the booting process stops after the mac change line
 
Old 03-23-2004, 08:01 AM   #6
aaa
Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
Try booting in single-user mode by adding the 'single' option on the boot menu. Then use vi or pico to edit.
 
Old 03-23-2004, 08:35 PM   #7
Agna
LQ Newbie
 
Registered: Mar 2004
Location: Suspended in Dusk
Distribution: ubuntu
Posts: 13

Original Poster
Rep: Reputation: 0
Great I solved it!!! Thanx for your help guys!

 
Old 08-26-2005, 10:38 PM   #8
jeofrey
LQ Newbie
 
Registered: Aug 2005
Posts: 1

Rep: Reputation: 0
please share to me your script

hi agna,

can you please share also to me the script that you made for macchanger becuase i have same isue with you.....

Thanks a lot,

jeofrey

Last edited by jeofrey; 08-26-2005 at 10:49 PM.
 
  


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
why input key everytime when run quake4 in linux? u2911 Linux - Games 3 11-27-2005 04:48 PM
where do i shove sumthing which i want to be run everytime i boot? theMonkeY Slackware 2 09-06-2004 03:49 PM
Need to run alsaconf everytime i boot up! RaVilj Red Hat 3 06-13-2004 06:23 PM
How do I get fortune to run everytime I start an xshell dtheorem Linux - Software 3 05-19-2004 01:22 PM
Why does Linux do a DNS lookup everytime I start an application? Bandhel Linux - Networking 2 02-23-2004 08:08 AM


All times are GMT -5. The time now is 03:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration