Computing.Net > Forums > Linux > setting path in rc.sysinit

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

setting path in rc.sysinit

Reply to Message Icon

Name: jcoder24
Date: March 11, 2003 at 04:57:59 Pacific
OS: RH8 + WIN2K
CPU/Ram: 394
Comment:

hi, i'm trying to find out where in the rc.sysinit the path variable is set.



Sponsored Link
Ads by Google

Response Number 1
Name: 3Dave
Date: March 11, 2003 at 07:16:22 Pacific
Reply:

If its not in there, just add it eg:

# Set the path
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH


0

Response Number 2
Name: jcoder24
Date: March 11, 2003 at 17:21:21 Pacific
Reply:

I'm looking to modify the rc.sysinit file and according to the HOWTO document I'm supposed to add it just after where the path is set in the rc.sysinit file but i can't seem to find it.

there is no set path... in the file


0

Response Number 3
Name: 3Dave
Date: March 12, 2003 at 01:41:37 Pacific
Reply:

Looking at my rc.sysinit, the path statement comes in right towards the top:

#!/bin/bash
#
# /etc/rc.d/rc.sysinit - run once at boot time
#
# Taken in part from Miquel van Smoorenburg's bcheckrc.
#

# Rerun ourselves through initlog
if [ -z "$IN_INITLOG" -a -x /sbin/initlog ]; then
exec /sbin/initlog $INITLOG_ARGS -r /etc/rc.d/rc.sysinit
fi

# Set the path
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH

HOSTNAME=`/bin/hostname`
if [ -f /etc/sysconfig/network ]; then
. /etc/sysconfig/network
else
NETWORKING=no
fi
......................


If you want to do a quick search of your /etc for files containing PATH:
# grep PATH /etc/*


0

Response Number 4
Name: jcoder24
Date: March 13, 2003 at 04:50:33 Pacific
Reply:

The only file in /etc that contains PATH is /etc/profile but I don't see that file being referenced in rc.sysinit.


0

Response Number 5
Name: 3Dave
Date: March 13, 2003 at 07:25:53 Pacific
Reply:

That's the default profile for people
logging on. Adding your path there may not
work for your application if it needs to be
run at boot. rc.sysinit is run on
initialising the system (hence the name).

I would suggest you try adding it in there
like it is in mine listed above.

if you are able to use your system OK, it
must be storing the /bin, /sbin etc in the
path somewhere else.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

MAC Address Linux Install Problems



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: setting path in rc.sysinit

PATH in LINUX www.computing.net/answers/linux/path-in-linux/15580.html

Set 'PATH' & 'CLASSPATH'.. www.computing.net/answers/linux/set-path-amp-classpath/23338.html

URGENT: Linux doesn't boot any longer www.computing.net/answers/linux/urgent-linux-doesnt-boot-any-longer/4689.html