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 12-11-2009, 10:43 PM   #1
ash_zz_00
Member
 
Registered: Aug 2009
Distribution: Slackware 13.0
Posts: 66

Rep: Reputation: 17
Unable to run rc.inet1 after logging in


Hi,

Slackware 12.2 on HP dv6t Notebook.

Sometimes I log in without connecting to the network. Now to connect to the network after the fact, I tried to run rc.inet1 but I get an error. However, it does run successfully during startup. The script does have execute permissions. What am I missing?


Code:
bash-3.1# ls -l rc.inet1
-rwxr-xr-x 1 root root 9437 2008-12-07 23:53 rc.inet1

bash-3.1# rc.inet1
bash: rc.inet1: command not found
Thanks in advance,

Ash.
 
Old 12-12-2009, 01:08 AM   #2
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Rep: Reputation: 55
Hi,

Try with,

Code:
bash-3.1# ./rc.inet1
Cheers !!
 
0 members found this post helpful.
Old 12-12-2009, 01:39 AM   #3
affinity
Member
 
Registered: Nov 2009
Distribution: Slackware64
Posts: 132

Rep: Reputation: 20
Are you acting as root? Also you would need to do the full path and a switch, in Slackware 13 the full path is "/etc/rc.d/rc.inet1". You can use the following switches "start; stop; restart". So in your case the process would be the following:

Code:
su
/etc/rc.d/rc.inet1 start
ping google.com
Pinging is just a quick test to see if you are online or not after starting the service.
 
1 members found this post helpful.
Old 12-12-2009, 09:25 PM   #4
ash_zz_00
Member
 
Registered: Aug 2009
Distribution: Slackware 13.0
Posts: 66

Original Poster
Rep: Reputation: 17
Thank you for the suggestions. It worked.

Just wondering, so is it typical in Linux to not use the present working directory? Is it always recommended to use the full path or at least explicitly specify the directory?

Regards,

Ash.
 
Old 12-13-2009, 08:08 PM   #5
affinity
Member
 
Registered: Nov 2009
Distribution: Slackware64
Posts: 132

Rep: Reputation: 20
Quote:
Originally Posted by ash_zz_00 View Post
Thank you for the suggestions. It worked.

Just wondering, so is it typical in Linux to not use the present working directory? Is it always recommended to use the full path or at least explicitly specify the directory?

Regards,

Ash.
You don't have to include the full path if you are in the file's current directory, I just did it in the example for future reference and because that way you could just open the shell and run the command without changing directories.

Last edited by affinity; 12-14-2009 at 12:28 AM.
 
Old 12-13-2009, 10:32 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,434

Rep: Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790
Quote:
is it typical in Linux to not use the present working directory?
Yes, it's a security issue, especially for root. If someone manages to get their own prog into your home dir (where you normally login), then they can substitute a trojan for eg the 'ls' cmd and own you. This goes double for root obviously.

Normally, you'd give either an absolute path (eg /etc/rc.d/rc.inet1) if you are some completely unrelated dir (or it's a cron entry) or you can use a 'relative' path eg ./rc.inet1 if you are in the /etc/rc.d/ dir.

http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
 
Old 12-22-2009, 01:38 PM   #7
ash_zz_00
Member
 
Registered: Aug 2009
Distribution: Slackware 13.0
Posts: 66

Original Poster
Rep: Reputation: 17
Thanks, that makes sense.
 
  


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
How do I get rc.inet1 to run when usb dev plugged in? charger Slackware 3 01-16-2008 08:55 AM
How to run something even after logging out? depam Linux - Software 4 07-21-2006 03:01 PM
rc.inet1 and rc.inet1.conf edafe Slackware 0 02-16-2005 09:51 AM
unable to get list after logging on to VSFTPD dmurray8888 Linux - Networking 2 04-29-2004 01:13 PM
Volume control is unable to run correctly. Unable to open audio device '/dev/mixer'. sevenreams Slackware 1 05-16-2003 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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