Re: [jenkins-ci PATCH 03/10] guests: Add custom shell profile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 06, 2018 at 04:39:44PM +0200, Andrea Bolognani wrote:
> On Fri, 2018-04-06 at 15:10 +0200, Andrea Bolognani wrote:
> > > I think that we should also load the system profile /etc/profile .. in
> > > case of 'jenkins' flavor we don't actually need it since that is used in
> > > automated tests but in case of 'test' flavor when developer will
> > > manually login into the guests might miss some features configured by
> > > thy system profile.
> > 
> > What kind of features are you thinking about, exactly?
> > 
> > /etc/profile can vary significantly between Linux versions, and on
> > FreeBSD it's not even loaded when using bash as the login shell
> > IIUC; however, in all cases the resulting environment is generally
> > pretty sane, so adding our own custom settings on top through the
> > user's profile works nicely.
> > 
> > Moreover, overriding setting in the user's profile instead of
> > tweaking them globally is a better approach in general IMHO, so if
> > there are specific features you'd like to address I would still
> > rather deal with them in the user's profile if at all possible.
> 
> Okay, so it looks like I misunderstood your comment: you were
> advocating for sourcing /etc/profile in the user's shell profile.
> 
> bash will actually load that file regardless, and on all Linux
> distributions the result is that features such as bash completion
> will be available to the user right after login, even with our
> custom shell profile in place.
> 
> FreeBSD, of course, behaves a little differently ;) You have to
> source the bash_completion script manually if you want that
> feature, as /etc/profile is tailored to the classic Bourne shell
> so it won't do that for you, and there is no such thing as a
> global bashrc that you can use.
> 
> All in all, it's pretty simple to add, but I think it's okay for
> it to be a follow-up patch. Are there more features you had in
> mind?

In that case and for FreeBSD there is no need to handle it.  I was
mostly concerned about Linux distributions.

Reviewed-by: Pavel Hrdina <phrdina@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux