Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jun 2024 07:45:34 +0200
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        Jessica Clarke <jrtc27@freebsd.org>
Cc:        John Baldwin <jhb@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: dcb65c5a94d4 - main - csh: Remove hardlink /.cshrc
Message-ID:  <20240605074534.92c8334aa97628f7b8c58296@bidouilliste.com>
In-Reply-To: <885F8DF1-69E2-4AC7-87E2-B63F1588DE17@freebsd.org>
References:  <202405290757.44T7vbf4021395@gitrepo.freebsd.org> <e447211e-6d51-4060-8f6c-b017bb1c9ce1@FreeBSD.org> <20240605073006.165e209edd1d6ce0c8520c9e@bidouilliste.com> <885F8DF1-69E2-4AC7-87E2-B63F1588DE17@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 5 Jun 2024 06:38:09 +0100
Jessica Clarke <jrtc27@freebsd.org> wrote:

> On 5 Jun 2024, at 06:30, Emmanuel Vadot <manu@bidouilliste.com> wrote:
> >=20
> >=20
> > Hi John,
> >=20
> > On Tue, 4 Jun 2024 16:07:53 -0700
> > John Baldwin <jhb@FreeBSD.org> wrote:
> >=20
> >> On 5/29/24 3:57 AM, Emmanuel Vadot wrote:
> >>> The branch main has been updated by manu:
> >>>=20
> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddcb65c5a94d4c622b1d486=
847dc20488f59974e7
> >>>=20
> >>> commit dcb65c5a94d4c622b1d486847dc20488f59974e7
> >>> Author:     Emmanuel Vadot <manu@FreeBSD.org>
> >>> AuthorDate: 2024-05-27 13:12:18 +0000
> >>> Commit:     Emmanuel Vadot <manu@FreeBSD.org>
> >>> CommitDate: 2024-05-29 07:56:58 +0000
> >>>=20
> >>>     csh: Remove hardlink /.cshrc
> >>>=20
> >>>     Remove this historical artifact.
> >>>     csh will try to use /.csrch if the user has no home directory def=
ined which
> >>>     is rather unlikely (To be exact if the concatenation of $HOME and=
 "/.cshrc"
> >>>     fail which is the same thing).
> >>>=20
> >>>     Also, with this change pkg will happily handle 3way merge for /ro=
ot/.cshrc
> >>>=20
> >>>     Differential Revision:  https://reviews.freebsd.org/D45382
> >>>     Reviewed by:            emaste, imp
> >>>     Sponsored by:           Beckhoff Automation GmbH & Co. KG
> >>=20
> >> FWIW, this happens anytime you use /bin/csh as root's shell and boot i=
nto
> >> single user mode.  Similar to /.profile being used for single user mod=
e if
> >> root's shell is /bin/sh.  Given we've changed the default shell for ro=
ot,
> >> then it's fine to do this change, but that probably should have been n=
oted
> >> in the commit log (in part to serve as a reminder so we don't remove t=
he
> >> links for sh).
> >=20
> > I've thought about single user and csh and yes that's a case where csh
> > will try to use /.cshrc but root shell doesn't matter here as you need
> > to specify /bin/csh as the init prompt for single user mode, the
> > default is still /bin/sh no matter what.
> > For /.profile, /bin/sh in single-user mode does have $HOME point
> > to /root so I think we can remove safely the /.profile hardlink. I
> > haven't looked at why /bin/csh doesn't have $HOME set but if someone
> > cares about using /bin/csh in single user mode (again nothing to do
> > with root shell) they probably wants to do something about setting
> > $HOME to /root/.
>=20
> Are you sure it?s /root before .profile is sourced? root?s .profile
> sets and exports HOME itself, so echo $HOME will be misleading at a
> single-user prompt for the environment at .profile source time.
>=20
> Note that root?s .cshrc doesn?t do this, which is likely what you?re
> seeing?
>=20
> Jess
>=20

 Yes indeed that's what I'm seeing, my bad :)

--=20
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240605074534.92c8334aa97628f7b8c58296>