Ignore:
Timestamp:
08/17/2014 06:21:21 PM (10 years ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.6, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
feb1a649
Parents:
73c535d7
Message:

Reference bash startup section in xorg intro

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@13936 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postlfs/config/profile.xml

    r73c535d7 rdc53944  
    162162done
    163163
     164uset script RED GREEN NORMAL
     165
    164166# End /etc/profile</literal>
    165167EOF</userinput></screen>
     
    214216      </indexterm>
    215217
    216       <para>This script adds several useful paths to the <envar>PATH</envar> and
    217       <envar>PKG_CONFIG_PATH</envar> environment variables.  If you want, you
    218       can uncomment the last section to put a dot at the end of your path. This will
    219       allow executables in the current working directory to be executed without
    220       specifying a ./, however you are warned that this is generally considered a
    221       security hazard.</para>
     218      <para>This script adds some useful paths to the <envar>PATH</envar> and
     219      can be used to customize other PATH related environment variables
     220      (e.g. LD_LIBRARY_PATH, etc) that may be needed for all users.</para>
    222221
    223222<screen role="root"><userinput>cat &gt; /etc/profile.d/extrapaths.sh &lt;&lt; "EOF"
     
    230229if [ -d /usr/local/sbin -a $EUID -eq 0 ]; then
    231230        pathprepend /usr/local/sbin
    232 fi
    233 
    234 if [ -d ~/bin ]; then
    235         pathprepend ~/bin
    236 fi
    237 #if [ $EUID -gt 99 ]; then
    238 #        pathappend .
    239 #fi</literal>
     231fi</literal>
    240232EOF</userinput></screen>
    241233
     
    381373fi
    382374
     375unset RED GREEN NORMAL
     376
    383377# End /etc/bashrc</literal>
    384378EOF</userinput></screen>
     
    413407# System wide aliases and functions are in /etc/bashrc.
    414408
    415 append () {
    416   # First remove the directory
    417   local IFS=':'
    418   local NEWPATH
    419   for DIR in $PATH; do
    420      if [ "$DIR" != "$1" ]; then
    421        NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
    422      fi
    423   done
    424 
    425   # Then append the directory
    426   export PATH=$NEWPATH:$1
    427 }
    428 
    429409if [ -f "$HOME/.bashrc" ] ; then
    430410  source $HOME/.bashrc
     
    432412
    433413if [ -d "$HOME/bin" ] ; then
    434   append $HOME/bin
    435 fi
    436 
    437 unset append
     414  pathprepend $HOME/bin
     415fi
     416
     417# Having . in the PATH is dangerous
     418#if [ $EUID -gt 99 ]; then
     419#  pathappend .
     420#fi
    438421
    439422# End ~/.bash_profile</literal>
Note: See TracChangeset for help on using the changeset viewer.