pdksh Shells Path Incorrectly Set at Install in Red Hat Enterprise Linux 5
Issue
- When installing pdksh, binary gets installed in /bin/pdksh:
# rpm -ql pdksh | grep pdksh
/bin/pdksh
/usr/share/doc/pdksh-5.2.14
/usr/share/doc/pdksh-5.2.14/BUG-REPORTS
/usr/share/doc/pdksh-5.2.14/LEGAL
/usr/share/doc/pdksh-5.2.14/NEWS
/usr/share/doc/pdksh-5.2.14/NOTES
/usr/share/doc/pdksh-5.2.14/PROJECTS
/usr/share/doc/pdksh-5.2.14/README
/usr/share/doc/pdksh-5.2.14/etc
/usr/share/doc/pdksh-5.2.14/etc/ksh.kshrc
/usr/share/doc/pdksh-5.2.14/etc/profile
/usr/share/doc/pdksh-5.2.14/etc/sys_config.sh
/usr/share/man/man1/pdksh.1.gz
- Path to shell in /etc/shells gets added as /usr/bin/pdksh:
# cat /etc/shells | grep pdksh
/usr/bin/pdksh
- Post install script from the RPM is what adds the path as /usr/bin/pdksh:
[root@dsirrine-ds-test ~]# rpm -q --scripts pdksh
postinstall scriptlet (using /bin/sh):
if [ ! -f /etc/shells ]; then
echo "/bin/ksh" > /etc/shells
else
if ! grep -q '^/bin/ksh$' /etc/shells ; then
echo "/bin/ksh" >> /etc/shells
fi
fi
if ! grep -q '^/usr/bin/ksh$' /etc/shells ; then
echo "/usr/bin/ksh" >> /etc/shells
fi
if ! grep -q '^/usr/bin/pdksh$' /etc/shells ; then
echo "/usr/bin/pdksh" >> /etc/shells
fi
Environment
- Red Hat Enterprise Linux 5.8
- pdksh-5.2.14-37.el5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
