If /rescue is at the head of $PATH (which is how it starts out in /rescue/sh
unless changed by something - and has been since NetBSD 3) don't blindly simply change it to a PATH that doesn't have /rescue in it at all. This doesn't solve the "/rescue/tar execs /usr/bin/gzip" problem completely, as if PATH is in the environment when /rescue/sh is started, that one will override the shell's built in PATH, but this is better than nothing.
This commit is contained in:
parent
63df21e1d6
commit
6c36afa3ab
|
@ -1,7 +1,11 @@
|
||||||
# $NetBSD: dot.profile,v 1.32 2020/08/24 12:46:57 nia Exp $
|
# $NetBSD: dot.profile,v 1.33 2022/07/09 09:43:51 kre Exp $
|
||||||
|
|
||||||
export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin
|
case "${PATH}" in
|
||||||
export PATH=${PATH}:/usr/X11R7/bin:/usr/local/sbin:/usr/local/bin
|
/rescue:*) ;; # leave it alone, user can change manually (if required)
|
||||||
|
*) export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin
|
||||||
|
export PATH=${PATH}:/usr/X11R7/bin:/usr/local/sbin:/usr/local/bin
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Uncomment the following line(s) to install binary packages
|
# Uncomment the following line(s) to install binary packages
|
||||||
# from cdn.NetBSD.org via pkg_add. (See also pkg_install.conf)
|
# from cdn.NetBSD.org via pkg_add. (See also pkg_install.conf)
|
||||||
|
|
Loading…
Reference in New Issue