-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update profile filename for zsh #821
Conversation
An earlier PR changed the user shell to zsh. Changed .profile to .zprofile so that zsh runs it on login. zsh does not read .profile.
WalkthroughThe pull request introduces a modification to the SSH daemon configuration script in the Home Assistant Community Add-on for Advanced SSH & Web Terminal. The change specifically alters how non-root user login shells are configured by shifting the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)ssh/rootfs/etc/s6-overlay/s6-rc.d/init-ssh/run (1)
Overwriting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to use zsh here when the only thing done by the shell is switch to a new user (and that users shell)? I get this pr because it fixes the regression that I was trying to patch too, but just curious why we even want to keep zsh in place for this user. |
@ViViDboarder yes, you have a point. I was thinking about this PR after I submitted it, and did wonder if it would have been better to revert the /bin/zsh to /bin/sh instead: as you say, this shell doesn't do anything. |
I'm fine with either tbh 🤷 |
This change breaks users that use bash instead of zsh ... Because #755 causes both the user and root to use either zsh or bash (vs. the user using sh and root using either zsh or bash), and this change removes .profile, so bash users no longer have a .profile to switch them to root. Either we need to revert #755 (and this change), or we need both .profile and .zprofile I agree with the other commenters here - I don't really see any benefit to #755 (since that shell is only used to switch to root, is there any benefit to supporting zsh for it?), so my suggestion would be to revert #755. |
Good point. Let's remove the bash option from this add-on 👍 |
I wasn't suggesting that :-P |
Or as it's a config option, do an if based on it? |
Or using |
This is the reason I originally submitted the revert patch. Basically to go to a known stable state while coming up with a stable move forward plan. That said, I still don’t see any advantage to using anything other than the default shell for the login user if we’re switching immediately. Might be good to revert both commits and then switch to using |
This turns out to be incomplete: see #826 |
Proposed Changes
An earlier PR changed the user shell to zsh. zsh does not run .profile, it looks for .zprofile instead. Changed .profile to .zprofile so that zsh runs it on login.
Related Issues
#788
#755
Summary by CodeRabbit
New Features
Bug Fixes