Bug 433283
Summary: | /etc/profile.d/script | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Per Lindahl <per.lindahl> |
Component: | openssh | Assignee: | Tomas Mraz <tmraz> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | high | Docs Contact: | |
Priority: | low | ||
Version: | 5.1 | CC: | johan.walles |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-02-18 12:13:58 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Per Lindahl
2008-02-18 11:51:51 UTC
This is not a bug. You shouldn't print anything in profile.d script when the shell is non-interactive. You can use for example the following code to test whether the shell is interactive or not. #!/bin/sh if [ ! -z "$PS1" ] ; then echo "You are running an interactive shell!" fi (In reply to comment #1) > You shouldn't print anything in profile.d script when the > shell is non-interactive. Tomas, that seems to make sense, but is it documented anywhere? I have been looking, but I haven't found any documentation saying that profile.d scripts shouldn't print stuff in non-interactive shells. I don't know whether it is explicitely mentioned somewhere but it seems logical that non-interactive shells should not print anything themselves. When you do for example 'ssh user@host ls' it will run the ls in non-interactive shell which means that things printed from profile.d scripts would be concatenated with the ls output. Even from the definition of the non-interactivity it seems logical to not put any messages from the shell/profile scripts itself to output as they won't be possibly getting to the user anyway. |