Move path definitions to include/paths.h. This makes it easier to override

these definitions in the /rescue case.

Submitted by:	Tim Kientzle <kientzle@acm.org>
This commit is contained in:
Gordon Tetlow 2003-06-29 18:06:05 +00:00
parent 63e11eb5e3
commit 1386defade
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117033
3 changed files with 8 additions and 14 deletions

View File

@ -69,7 +69,10 @@
#define _PATH_LOGIN "/usr/bin/login"
#define _PATH_MAILDIR "/var/mail"
#define _PATH_MAN "/usr/share/man"
#define _PATH_MDCONFIG "/sbin/mdconfig"
#define _PATH_MEM "/dev/mem"
#define _PATH_MOUNT "/sbin/mount"
#define _PATH_NEWFS "/sbin/newfs"
#define _PATH_NOLOGIN "/var/run/nologin"
#define _PATH_RCP "/bin/rcp"
#define _PATH_REBOOT "/sbin/reboot"

View File

@ -340,7 +340,7 @@ do_mdconfig_attach(const char *args, const enum md_types mdtype)
default:
abort();
}
rv = run(NULL, "%s -a %s%s -u %s%d", PATH_MDCONFIG, ta, args,
rv = run(NULL, "%s -a %s%s -u %s%d", _PATH_MDCONFIG, ta, args,
mdname, unit);
if (rv)
errx(1, "mdconfig (attach) exited with error code %d", rv);
@ -373,7 +373,7 @@ do_mdconfig_attach_au(const char *args, const enum md_types mdtype)
default:
abort();
}
rv = run(&fd, "%s -a %s%s", PATH_MDCONFIG, ta, args);
rv = run(&fd, "%s -a %s%s", _PATH_MDCONFIG, ta, args);
if (rv)
errx(1, "mdconfig (attach) exited with error code %d", rv);
@ -411,7 +411,7 @@ do_mdconfig_detach(void)
{
int rv;
rv = run(NULL, "%s -d -u %s%d", PATH_MDCONFIG, mdname, unit);
rv = run(NULL, "%s -d -u %s%d", _PATH_MDCONFIG, mdname, unit);
if (rv && debug) /* This is allowed to fail. */
warnx("mdconfig (detach) exited with error code %d (ignored)",
rv);
@ -425,7 +425,7 @@ do_mount(const char *args, const char *mtpoint)
{
int rv;
rv = run(NULL, "%s%s /dev/%s%d %s", PATH_MOUNT, args,
rv = run(NULL, "%s%s /dev/%s%d %s", _PATH_MOUNT, args,
mdname, unit, mtpoint);
if (rv)
errx(1, "mount exited with error code %d", rv);
@ -475,7 +475,7 @@ do_newfs(const char *args)
{
int rv;
rv = run(NULL, "%s%s /dev/%s%d", PATH_NEWFS, args, mdname, unit);
rv = run(NULL, "%s%s /dev/%s%d", _PATH_NEWFS, args, mdname, unit);
if (rv)
errx(1, "newfs exited with error code %d", rv);
}

View File

@ -1,9 +0,0 @@
/* $FreeBSD$ */
#ifndef MDMFS_PATHNAMES_H
#define MDMFS_PATHNAMES_H
#define PATH_MDCONFIG "/sbin/mdconfig"
#define PATH_NEWFS "/sbin/newfs"
#define PATH_MOUNT "/sbin/mount"
#endif /* !MDMFS_PATHNAMES_H */