Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 64029 Details for
Bug 99814
Non-interactive Bash needs to be able to load a global bashrc/profile.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Implement /etc/profile.global
baselayout-profile-global.patch (text/plain), 2.93 KB, created by
Robin Johnson
on 2005-07-21 23:32:42 UTC
(
hide
)
Description:
Implement /etc/profile.global
Filename:
MIME Type:
Creator:
Robin Johnson
Created:
2005-07-21 23:32:42 UTC
Size:
2.93 KB
patch
obsolete
>Index: etc/profile.global >=================================================================== >--- etc/profile.global (revision 0) >+++ etc/profile.global (revision 0) >@@ -0,0 +1,30 @@ >+# /etc/profile.global: bash shell setup >+# >+# This file contains the shared setup for all Bourne-shell derivative modes. >+# It is run for login shells, non-primary shells as well as non-interactive >+# shells. It should not produce any output. >+ >+# Load environment settings from profile.env, which is created by >+# env-update from the files in /etc/env.d >+if [ -e /etc/profile.env ] ; then >+ . /etc/profile.env >+fi >+ >+# 077 would be more secure, but 022 is generally quite realistic >+umask 022 >+ >+# Set up PATH depending on whether we're root or a normal user. >+# There's no real reason to exclude sbin paths from the normal user, >+# but it can make tab-completion easier when they aren't in the >+# user's PATH to pollute the executable namespace. >+# >+# It is intentional in the following line to use || instead of -o. >+# This way the evaluation can be short-circuited and calling whoami is >+# avoided. >+if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then >+ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}" >+else >+ PATH="/usr/local/bin:/usr/bin:/bin:${PATH}" >+fi >+export PATH >+unset ROOTPATH >Index: etc/profile >=================================================================== >--- etc/profile (revision 1337) >+++ etc/profile (working copy) >@@ -4,31 +4,9 @@ > # environment for login shells. > # > >-# Load environment settings from profile.env, which is created by >-# env-update from the files in /etc/env.d >-if [ -e /etc/profile.env ] ; then >- . /etc/profile.env >-fi >+# Load the shared setup >+. /etc/profile.global > >-# 077 would be more secure, but 022 is generally quite realistic >-umask 022 >- >-# Set up PATH depending on whether we're root or a normal user. >-# There's no real reason to exclude sbin paths from the normal user, >-# but it can make tab-completion easier when they aren't in the >-# user's PATH to pollute the executable namespace. >-# >-# It is intentional in the following line to use || instead of -o. >-# This way the evaluation can be short-circuited and calling whoami is >-# avoided. >-if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then >- PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}" >-else >- PATH="/usr/local/bin:/usr/bin:/bin:${PATH}" >-fi >-export PATH >-unset ROOTPATH >- > # Extract the value of EDITOR > [ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf 2>/dev/null; echo $EDITOR`" > [ -z "$EDITOR" ] && EDITOR="/bin/nano" >--- etc/bash/bashrc.old 2005-07-21 23:28:35.000000000 -0700 >+++ etc/bash/bashrc 2005-07-21 23:26:52.000000000 -0700 >@@ -9,7 +9,8 @@ > # past this point for scp and rcp, and it's important to refrain from > # outputting anything in those cases. > if [[ $- != *i* ]] ; then >- # Shell is non-interactive. Be done now >+ # Shell is non-interactive. Be done after loading global stuff >+ . /etc/profile.global > return > fi >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 99814
: 64029