LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-27-2006, 01:01 AM   #16
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31

A bit offtopic .. but .. how do I edit "myfile.txt" with vim? Please don't reply if your answer is "vim myfile.txt".



*cough* kidding.
 
Old 07-27-2006, 08:44 AM   #17
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
Just put "alias vi=vim" in your bashrc and run "vi myfile.txt". :-)
 
Old 07-27-2006, 09:10 AM   #18
bonowax
Member
 
Registered: Jul 2006
Location: Suburbs of Lisbon, Portugal
Distribution: Slackware, FreeBSD
Posts: 61

Rep: Reputation: 16
Hmmm... How 'bout 'sh rc.local'?... That's different from './rc.local' isn't it?...

Regards
 
Old 07-27-2006, 10:03 AM   #19
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 30
Quote:
Originally Posted by bonowax
...How 'bout 'sh rc.local'?... That's different from './rc.local' isn't it?...
No it isn't different at all.

Doing /etc/rc.d/rc.local (full path) or cd /etc/rc.d/ ; ./rc.local (relative path) [first way] is the same as doing sh /etc/rc.d/rc.local (full path) or cd /etc/rc.d/ ; sh ./rc.local (relative path) [second way]

But in order for the first to work (without sh) the file or script to execute ("rc.local" in this case) must have the execute permission, the x letters in
Code:
$ ls -l /etc/rc.d/rc.local
-rwxr-xr-x  1 root root 614 2006-07-26 16:38 /etc/rc.d/rc.local
If the file or script to execute doesn't have the execute permission, though you want to execute it once for any reason, you can do so with sh before it, as the second way.

When you call a file or script in the first way, whatever shell you use, commonly bash or sh, checks the first line in the file for a program to execute it

Code:
$ head -1 /etc/rc.d/rc.local
#!/bin/sh
That's how if /etc/rc.d/rc.local has the execute permission it gets done by a call to /bin/sh, which is the same as the sh you can put before it

I hope that helped more than confused ye
 
Old 07-27-2006, 10:41 AM   #20
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
raska, I think bonowax was doing a similar tongue-in-cheek response to the OP that I did to introuble's.
 
Old 07-27-2006, 11:02 AM   #21
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 30
damn...
The urge to say something useful was too overwhelming LOL

did someone put something in my coffee again?
 
Old 07-27-2006, 01:42 PM   #22
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
* introuble hides
 
Old 07-27-2006, 04:30 PM   #23
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 66
Looks like the OP hides....
 
Old 07-27-2006, 05:02 PM   #24
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
What did you expect with 2 pages worth of sarchastic remarks.

I would probably be hiding too.

...drkstr
 
Old 07-28-2006, 05:21 AM   #25
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
I'm not the OP. The "* introuble hides" was a reply to:

Quote:
Originally Posted by raska
did someone put something in my coffee again?
If you'll re-read the thread carefully, you'll see I contributed with a sarcastic post meself.
 
Old 07-28-2006, 05:11 PM   #26
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
I'm pretty sure cwwilson721 was aware of that, but I guess I can't speak for him ..oh wait, I jsut did.

...drkstr
 
Old 07-28-2006, 05:45 PM   #27
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware-current
Posts: 1,244

Rep: Reputation: 47
Perhaps he is looking for /etc/rc.d/rc.local restart
 
Old 07-28-2006, 05:50 PM   #28
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 30
telinit 6 shall do the trick
 
Old 07-28-2006, 07:18 PM   #29
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 66
Quote:
Originally Posted by drkstr
I'm pretty sure cwwilson721 was aware of that, but I guess I can't speak for him ..oh wait, I jsut did.

...drkstr
I was aware of it, but was also stating that the OP seems to be ignoring his thread, or started it for nefarious reasons....lol And trying to get the thread back on track...

But, it seems like it's taken on a life of its own...

As for
Quote:
Originally Posted by raska
telinit 6 shall do the trick
since none of us are sure what he really wants, drop kicking the box into a pond oughta work too....(But still a good suggestion)
 
Old 07-25-2012, 06:12 PM   #30
jtpram
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Rep: Reputation: 0
i know what is your problem...

Let's assume in your original rc.local has:
route -add blablabla


then you want to refresh the new rc.local without:
route -add blablabla


re-executing the rc.local will not work because you need to manually delete the route:
route -delete blablabla
 
  


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
rc.local won't execute on Suse 10.0 advwebsys Suse/Novell 5 01-26-2006 05:45 PM
is there a way to make a local linux server the time stamp server for win2k? Lleb_KCir Linux - General 2 09-19-2005 07:05 PM
How to make a command execute on it every reboot? peterguo Linux - Software 5 11-04-2004 07:23 PM
how to execute my program when any user logs off my linux server ? rags2k Programming 8 08-17-2004 02:33 PM
Is it possible to make a Linux server execute a program on a WinXP system? Cichlasoma Linux - General 4 04-23-2004 06:00 AM


All times are GMT -5. The time now is 01: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