[Linux-PowerEdge] dcism RPM pollutes /etc/bashrc

Kilian Cavalotti kilian.cavalotti.work at gmail.com
Wed Mar 11 11:06:27 CDT 2020


Hi Dell,

Could you please stop polluting the system /etc/bashrc with the dcism
RPM post-installation scripts?

I spent the last 20 minutes trying to figure out where that
/opt/dell/srvadmin/iSM/bin was coming from in my users' $PATH, before
realizing that it's actually embedded in the system-level /etc/bashrc!

-- 8<---------------------------------------------------------------------
$ tail -n4 /etc/bashrc
    unset -f pathmunge
fi
# vim:ts=4:sw=4
. /opt/dell/srvadmin/iSM/sbin/dcism-path.sh  #added by ##dcism##
ensure iSM bin path set for all shells, login/non-login and
interactive/non-interactive
-- 8<---------------------------------------------------------------------

This is actually the work of the postinstall script in the dcism RPM.
Here's the relevant part of that scriptlet, from
dcism-3.5.0-1862.el7.x86_64, which is the latest available version
AFAIK (indentation is verbatim):

-- 8<---------------------------------------------------------------------
   # Add iSM BIN path
       if [ -f /etc/bashrc ]
       then
     if ! grep -q /opt/dell/srvadmin/iSM/sbin/dcism-path.sh /etc/bashrc; then
     echo ". /opt/dell/srvadmin/iSM/sbin/dcism-path.sh  #added by
##dcism## ensure iSM bin path set for all shells, login/non-login and
interactive/non-interactive" >> /etc/bashrc
     fi
-- 8<---------------------------------------------------------------------

So, no backup of the original /etc/bashrc and modification of a system
file that is not under the control of that RPM, this is an impressive
combination of bad practices.

Not to mention that it is completely ineffective for other shells, and
that /etc/bashrc is never read unless it's explicitly sourced from a
user's ~/.bashrc.

Please fix this.

Cheers,
-- 
Kilian



More information about the Linux-PowerEdge mailing list