summaryrefslogtreecommitdiffstats
path: root/sbin/sysinstall
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-11-20 00:49:21 +0000
committerphk <phk@FreeBSD.org>1994-11-20 00:49:21 +0000
commitbc27a932fa17cf66eabd07d75f81262f03a78b30 (patch)
treeeca6dd4c20940df769fc62e13bcae79a62e8d833 /sbin/sysinstall
parentef0518f6dbd21e2b4e00a60a68a7fb38ec67d460 (diff)
downloadFreeBSD-src-bc27a932fa17cf66eabd07d75f81262f03a78b30.zip
FreeBSD-src-bc27a932fa17cf66eabd07d75f81262f03a78b30.tar.gz
A couple of changes more. Now Paul & Jordan can play again... :-)
Diffstat (limited to 'sbin/sysinstall')
-rw-r--r--sbin/sysinstall/label.c2
-rw-r--r--sbin/sysinstall/stage2.c22
2 files changed, 18 insertions, 6 deletions
diff --git a/sbin/sysinstall/label.c b/sbin/sysinstall/label.c
index eb68434..14b8e7e 100644
--- a/sbin/sysinstall/label.c
+++ b/sbin/sysinstall/label.c
@@ -153,7 +153,7 @@ edit_disklabel(int disk)
return (-1);
}
sprintf(disk_list[disk].mounts[i].fs_spec,
- "/dev/%s%d%s", disk_list[disk].devconf->dc_name,
+ "%s%d%s", disk_list[disk].devconf->dc_name,
disk_list[disk].devconf->dc_unit,
partname[i]);
diff --git a/sbin/sysinstall/stage2.c b/sbin/sysinstall/stage2.c
index 881155f..69c10f4 100644
--- a/sbin/sysinstall/stage2.c
+++ b/sbin/sysinstall/stage2.c
@@ -43,8 +43,15 @@ stage2()
/* Sort in mountpoint order */
memset(fidx, 0, sizeof fidx);
+ for (i = 0; i < no_mounts; i++) {
+ Debug("%d %s %s %s %s",i,
+ mounts[i]->fs_spec,
+ mounts[i]->fs_file,
+ mounts[i]->fs_vfstype,
+ mounts[i]->fs_mntops);
+ }
for (j = 1; j;)
- for (j = 0, i = 0; i < no_mounts; i++) {
+ for (j = 0, i = 0; i < (no_mounts-1); i++) {
if (strcmp(mounts[i]->fs_file, mounts[i+1]->fs_file) > 0) {
fp = mounts[i];
mounts[i] = mounts[i+1];
@@ -52,7 +59,7 @@ stage2()
j++;
}
}
-
+ Debug("sorted by mountpoint");
for (j = 0; j < no_mounts; j++) {
if (strcmp(mounts[j]->fs_vfstype, "ufs"))
continue;
@@ -67,12 +74,17 @@ stage2()
Fatal("Exec(/stand/newfs) failed, code=%d.",i);
}
- for (j = 0; fidx[j]; j++) {
- strcpy(dbuf, "/mnt");
+ for (j = 0; j < no_mounts; j++) {
+ if (!strcmp(mounts[j]->fs_vfstype, "swap"))
+ break;
p = mounts[j]->fs_spec;
q = mounts[j]->fs_file;
- if (strcmp(q, "/"))
+ strcpy(dbuf, "/mnt");
+ if (strcmp(q, "/")) {
+ if (*q != '/')
+ strcat(dbuf, "/");
strcat(dbuf, q);
+ }
Mkdir(dbuf);
if (strcmp(mounts[j]->fs_vfstype, "ufs"))
continue;
OpenPOWER on IntegriCloud