I am trying to modify the PATH variable in two different scripts
located in /etc/profile.d/
/etc/profile.d/php.sh#!/bin/sh PATH=$PATH:/usr/local/php/bin export PATH/etc/profile.d/mysql.sh#!/bin/sh PATH=$PATH:/usr/local/mysql/bin export PATH
Restarting CentOS and checking the PATH variable (edited),
the $PATH is modified twice!
[]$ echo $PATH
/usr/lib/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:
/usr/local/mysql/bin:/usr/local/php/bin:/home/IntUser/bin:/usr/local/mysql/bin:
/usr/local/php/bin
[]$
In root mode:
[]$ su
Password:
[]#
The $PATH is modified 3 times!
[]# echo $PATH
/usr/lib/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:
/usr/local/mysql/bin:/usr/local/php/bin:/home/IntUser/bin:/usr/local/mysql/bin:
/usr/local/php/bin:/usr/local//mysql/bin:/usr/local/php/bin
[]#
Why is it not assigned only one time?
bash -lvx -c true >log 2>&1. Seelogto find where it updatesPATH.