Why does bashlogin export the "path" variable?

All other development questions
floppym
Posts: 1
Joined: 03 Dec 2012, 01:50

Why does bashlogin export the "path" variable?

Postby floppym » 03 Dec 2012, 02:04

The /bin/bashlogin file in systemrescuecd appears to be heavily customized; it looks nothing like the copy shipped in app-misc/livecd-tools-1.0.42.

At the top of this file is a line reading:

Code: Select all

export path="/sbin /bin /usr/sbin /usr/bin"


Why is this line present?

I have seen it cause problems for users building certain packages; a specific example escapes me at the moment. The problem boils down to some Makefile which is using the $path variable from the environment, expecting it to be empty under some condition.

This is complicated by zsh's built-in $path variable, which makes the value of path in the environment invisible unless you launch a different shell (like bash).

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: Why does bashlogin export the "path" variable?

Postby gernot » 03 Dec 2012, 05:19

I dont know why path is set, but PATH is set because sysrcd don't use /bin/login.
In normal systems /bin/login set PATH.

Gernot


Return to “Other”

Who is online

Users browsing this forum: No registered users and 2 guests