Date: Tue, 26 Oct 2021 14:50:22 GMT From: Ka Ho Ng <khng@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: fcfa64801a4f - main - sh: Set PATH envvar after setting HOME in dotfile Message-ID: <202110261450.19QEoMqo020433@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=fcfa64801a4fe836ff481465ea068e791aa4ce6a commit fcfa64801a4fe836ff481465ea068e791aa4ce6a Author: Ka Ho Ng <khng@FreeBSD.org> AuthorDate: 2021-10-26 14:48:57 +0000 Commit: Ka Ho Ng <khng@FreeBSD.org> CommitDate: 2021-10-26 14:50:09 +0000 sh: Set PATH envvar after setting HOME in dotfile In single-user mode, all env vars are absent, so exptilde() would not be able to expand ~ correctly. Place the lines setting PATH below HOME, so exptilde() would work as expected. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: jilles, emaste Differential Revision: https://reviews.freebsd.org/D27003 --- bin/sh/dot.profile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sh/dot.profile b/bin/sh/dot.profile index fd0c43fdb927..e296a360bcc7 100644 --- a/bin/sh/dot.profile +++ b/bin/sh/dot.profile @@ -1,9 +1,9 @@ # $FreeBSD$ # -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin -export PATH HOME=/root export HOME +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin +export PATH TERM=${TERM:-xterm} export TERM PAGER=less
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110261450.19QEoMqo020433>