diff options
author | jkh <jkh@FreeBSD.org> | 1997-10-13 17:32:29 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-10-13 17:32:29 +0000 |
commit | 2afa55ca386e52677c9f53098ccb3c3d8a217936 (patch) | |
tree | 87c7f42e2f97239e951f48dced9766caff1c94ad | |
parent | 36e2a3d8e91590900201d68269018446008eb684 (diff) | |
download | FreeBSD-src-2afa55ca386e52677c9f53098ccb3c3d8a217936.zip FreeBSD-src-2afa55ca386e52677c9f53098ccb3c3d8a217936.tar.gz |
Ask for extra confirmation if a newfs has been requested during
an upgrade.
PR: 3368
-rw-r--r-- | release/sysinstall/install.c | 6 | ||||
-rw-r--r-- | usr.sbin/sade/install.c | 6 | ||||
-rw-r--r-- | usr.sbin/sysinstall/install.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index 4cdf685..6ae04ff 100644 --- a/release/sysinstall/install.c +++ b/release/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.200 1997/10/06 08:36:12 jkh Exp $ + * $Id: install.c,v 1.201 1997/10/12 16:21:13 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -883,7 +883,7 @@ installFilesystems(dialogMenuItem *self) if (strcmp(root->mountpoint, "/")) msgConfirm("Warning: %s is marked as a root partition but is mounted on %s", rootdev->name, root->mountpoint); - if (root->newfs) { + if (root->newfs && (!upgrade || !msgYesNo("You are upgrading - are you SURE you want to newfs the root partition?"))) { int i; msgNotify("Making a new root filesystem on %s", dname); @@ -943,7 +943,7 @@ installFilesystems(dialogMenuItem *self) if (c2 == rootdev) continue; - if (tmp->newfs) + if (tmp->newfs && (!upgrade || !msgYesNo("You are upgradding - are you SURE you want to newfs /dev/%s?", c2->name))) command_shell_add(tmp->mountpoint, "%s %s/dev/r%s", tmp->newfs_cmd, RunningAsInit ? "/mnt" : "", c2->name); else command_shell_add(tmp->mountpoint, "fsck -y %s/dev/r%s", RunningAsInit ? "/mnt" : "", c2->name); diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 4cdf685..6ae04ff 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.200 1997/10/06 08:36:12 jkh Exp $ + * $Id: install.c,v 1.201 1997/10/12 16:21:13 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -883,7 +883,7 @@ installFilesystems(dialogMenuItem *self) if (strcmp(root->mountpoint, "/")) msgConfirm("Warning: %s is marked as a root partition but is mounted on %s", rootdev->name, root->mountpoint); - if (root->newfs) { + if (root->newfs && (!upgrade || !msgYesNo("You are upgrading - are you SURE you want to newfs the root partition?"))) { int i; msgNotify("Making a new root filesystem on %s", dname); @@ -943,7 +943,7 @@ installFilesystems(dialogMenuItem *self) if (c2 == rootdev) continue; - if (tmp->newfs) + if (tmp->newfs && (!upgrade || !msgYesNo("You are upgradding - are you SURE you want to newfs /dev/%s?", c2->name))) command_shell_add(tmp->mountpoint, "%s %s/dev/r%s", tmp->newfs_cmd, RunningAsInit ? "/mnt" : "", c2->name); else command_shell_add(tmp->mountpoint, "fsck -y %s/dev/r%s", RunningAsInit ? "/mnt" : "", c2->name); diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 4cdf685..6ae04ff 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.200 1997/10/06 08:36:12 jkh Exp $ + * $Id: install.c,v 1.201 1997/10/12 16:21:13 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -883,7 +883,7 @@ installFilesystems(dialogMenuItem *self) if (strcmp(root->mountpoint, "/")) msgConfirm("Warning: %s is marked as a root partition but is mounted on %s", rootdev->name, root->mountpoint); - if (root->newfs) { + if (root->newfs && (!upgrade || !msgYesNo("You are upgrading - are you SURE you want to newfs the root partition?"))) { int i; msgNotify("Making a new root filesystem on %s", dname); @@ -943,7 +943,7 @@ installFilesystems(dialogMenuItem *self) if (c2 == rootdev) continue; - if (tmp->newfs) + if (tmp->newfs && (!upgrade || !msgYesNo("You are upgradding - are you SURE you want to newfs /dev/%s?", c2->name))) command_shell_add(tmp->mountpoint, "%s %s/dev/r%s", tmp->newfs_cmd, RunningAsInit ? "/mnt" : "", c2->name); else command_shell_add(tmp->mountpoint, "fsck -y %s/dev/r%s", RunningAsInit ? "/mnt" : "", c2->name); |