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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-11-2009, 10:43 PM
|
#1
|
Member
Registered: Aug 2009
Distribution: Slackware 13.0
Posts: 66
Rep:
|
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.
|
|
|
12-12-2009, 01:08 AM
|
#2
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Rep:
|
Hi,
Try with,
Code:
bash-3.1# ./rc.inet1
Cheers !!
|
|
0 members found this post helpful.
|
12-12-2009, 01:39 AM
|
#3
|
Member
Registered: Nov 2009
Distribution: Slackware64
Posts: 132
Rep:
|
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.
|
12-12-2009, 09:25 PM
|
#4
|
Member
Registered: Aug 2009
Distribution: Slackware 13.0
Posts: 66
Original Poster
Rep:
|
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.
|
|
|
12-13-2009, 08:08 PM
|
#5
|
Member
Registered: Nov 2009
Distribution: Slackware64
Posts: 132
Rep:
|
Quote:
Originally Posted by ash_zz_00
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.
|
|
|
12-13-2009, 10:32 PM
|
#6
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,434
|
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
|
|
|
12-22-2009, 01:38 PM
|
#7
|
Member
Registered: Aug 2009
Distribution: Slackware 13.0
Posts: 66
Original Poster
Rep:
|
Thanks, that makes sense.
|
|
|
All times are GMT -5. The time now is 11:17 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|