diff options
| author | Kirk McKusick <mckusick@FreeBSD.org> | 2024-10-03 15:05:42 +0000 |
|---|---|---|
| committer | Kirk McKusick <mckusick@FreeBSD.org> | 2024-10-03 15:06:28 +0000 |
| commit | 5b21d4ad060acb06c72e0458daebec9bcbf0cefd (patch) | |
| tree | 12005deed4a9a6d3a0442f8d6dabe96a4748a381 | |
| parent | 79a0d14fa05c75038caa52099289effb85732f88 (diff) | |
| -rw-r--r-- | include/paths.h | 3 | ||||
| -rw-r--r-- | sbin/mdmfs/mdmfs.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/paths.h b/include/paths.h index 86900664230b..f8861ea4e5a8 100644 --- a/include/paths.h +++ b/include/paths.h @@ -89,6 +89,7 @@ #define _PATH_SENDMAIL "/usr/sbin/sendmail" #define _PATH_SHELLS "/etc/shells" #define _PATH_TTY "/dev/tty" +#define _PATH_TUNEFS "/sbin/tunefs" #define _PATH_UNIX "don't use _PATH_UNIX" #define _PATH_UFSSUSPEND "/dev/ufssuspend" #define _PATH_VI "/usr/bin/vi" @@ -138,6 +139,8 @@ __END_DECLS #define _PATH_REBOOT "/rescue/reboot" #undef _PATH_RM #define _PATH_RM "/rescue/rm" +#undef _PATH_TUNEFS +#define _PATH_TUNEFS "/rescue/tunefs" #undef _PATH_VI #define _PATH_VI "/rescue/vi" #undef _PATH_WALL diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c index 93fa9e8ff0c0..69149b3fb465 100644 --- a/sbin/mdmfs/mdmfs.c +++ b/sbin/mdmfs/mdmfs.c @@ -104,7 +104,7 @@ main(int argc, char **argv) bool detach, softdep, autounit, newfs; const char *mtpoint, *size_arg, *skel, *unitstr; char *p; - int ch, idx; + int ch, idx, rv; void *set; unsigned long ul; @@ -357,6 +357,13 @@ main(int argc, char **argv) do_mdconfig_attach(mdconfig_arg, mdtype); if (newfs) do_newfs(newfs_arg); + if (!softdep) { + rv = run(NULL, "%s %s /dev/%s%d", _PATH_TUNEFS, + "-n disable", mdname, unit); + if (rv) + errx(1, "tunefs exited %s %d", run_exitstr(rv), + run_exitnumber(rv)); + } do_mount_md(mount_arg, mtpoint); } |
