Support RESCUEDIR for _PATH_VI.

Fixes /rescue/disklabel -e
This commit is contained in:
lukem 2008-09-28 06:38:02 +00:00
parent cc11735df8
commit e2a43ad977

View File

@ -1,4 +1,4 @@
/* $NetBSD: paths.h,v 1.33 2008/02/04 15:27:20 christos Exp $ */
/* $NetBSD: paths.h,v 1.34 2008/09/28 06:38:02 lukem Exp $ */
/*
* Copyright (c) 1989, 1993
@ -36,8 +36,8 @@
/*
* Default user search path.
* set by login(1), rshd(8), rexecd(8)
* used by execvp(3) absent PATH from the environ(7)
* Set by login(1), rshd(8), rexecd(8)
* Used by execvp(3) absent PATH from the environ(7)
*/
#ifdef RESCUEDIR
#define _PATH_DEFPATH RESCUEDIR ":/usr/bin:/bin:/usr/pkg/bin:/usr/local/bin"
@ -47,8 +47,8 @@
/*
* All standard utilities path.
* set by init(8) for system programs & scripts (e.g. /etc/rc)
* used by ttyaction(3), whereis(1)
* Set by init(8) for system programs & scripts (e.g. /etc/rc)
* Used by ttyaction(3), whereis(1)
*/
#define _PATH_STDPATH \
"/usr/bin:/bin:/usr/sbin:/sbin:/usr/pkg/bin:/usr/pkg/sbin:/usr/local/bin:/usr/local/sbin"
@ -94,11 +94,10 @@
#define _PATH_TTY "/dev/tty"
#define _PATH_UNIX "/netbsd"
#define _PATH_URANDOM "/dev/urandom"
#define _PATH_VI "/usr/bin/vi"
/*
* Provide trailing slash, since mostly used for building pathnames.
* see the __CONCAT() macro from <sys/cdefs.h> for cpp examples.
* See the __CONCAT() macro from <sys/cdefs.h> for cpp examples.
*/
#define _PATH_DEV "/dev/"
#define _PATH_DEV_PTS "/dev/pts/"
@ -108,12 +107,18 @@
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"
/*
* Paths that may change if RESCUEDIR is defined.
* Used by tools in /rescue.
*/
#ifdef RESCUEDIR
#define _PATH_BSHELL RESCUEDIR "/sh"
#define _PATH_CSHELL RESCUEDIR "/csh"
#define _PATH_VI RESCUEDIR "/vi"
#else
#define _PATH_BSHELL "/bin/sh"
#define _PATH_CSHELL "/bin/csh"
#define _PATH_VI "/usr/bin/vi"
#endif
#endif /* !_PATHS_H_ */