Once upon a time, DEVFS was optional, major numbers where static, and /dev
needed to be statically populated with device nodes. The first two are no longer true, which makes the third pretty moot. In fact, we don't seem to put device node bits into the distribution archives at all anymore. So..... remove the god-aweful nasty hack that force unmounted devfs during installation so that static device nodes could land in /dev. Now that the vnode cleaner handles this case better this isn't strictly needed, but axeing code in sysinstall is almost always benficial. Thanks to Don Lewis for pointing out this attribute of sysinstall.
This commit is contained in:
parent
b6679af8f0
commit
b4fdd9becf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123571
@ -521,7 +521,7 @@ distExtractTarball(char *path, char *dist, char *my_dir, int is_base)
|
||||
{
|
||||
char *buf = NULL, fname[PATH_MAX];
|
||||
struct timeval start, stop;
|
||||
int i, j, status, total, intr, unmounted_dev;
|
||||
int i, j, status, total, intr;
|
||||
int cpid, zpid, fd2, chunk, numchunks;
|
||||
properties dist_attr = NULL;
|
||||
const char *tmp;
|
||||
@ -600,12 +600,6 @@ distExtractTarball(char *path, char *dist, char *my_dir, int is_base)
|
||||
total = 0;
|
||||
(void)gettimeofday(&start, (struct timezone *)NULL);
|
||||
|
||||
if (is_base && RunningAsInit && !Fake) {
|
||||
unmounted_dev = 1;
|
||||
unmount("/dev", MNT_FORCE);
|
||||
} else
|
||||
unmounted_dev = 0;
|
||||
|
||||
/* We have one or more chunks, initialize unpackers... */
|
||||
mediaExtractDistBegin(root_bias(my_dir), &fd2, &zpid, &cpid);
|
||||
|
||||
@ -723,21 +717,6 @@ distExtractTarball(char *path, char *dist, char *my_dir, int is_base)
|
||||
else
|
||||
(void)mediaExtractDistEnd(zpid, cpid);
|
||||
|
||||
if (unmounted_dev) {
|
||||
struct iovec iov[4];
|
||||
|
||||
iov[0].iov_base = "fstype";
|
||||
iov[0].iov_len = sizeof("fstype");
|
||||
iov[1].iov_base = "devfs";
|
||||
iov[1].iov_len = sizeof("devfs");
|
||||
iov[2].iov_base = "fspath";
|
||||
iov[2].iov_len = sizeof("fstype");
|
||||
iov[3].iov_base = "/dev";
|
||||
iov[3].iov_len = sizeof("/dev");
|
||||
(void)nmount(iov, 4, 0);
|
||||
unmounted_dev = 0;
|
||||
}
|
||||
|
||||
safe_free(buf);
|
||||
return (status);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user