aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1997-01-15 03:57:50 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1997-01-15 03:57:50 +0000
commit9b1696b0022ef9f18abf518bdc1cb570a69e5a18 (patch)
treee29631ff0b3fd1b26781605d2e641679637f04af /usr.sbin
parentb8a83a83ca1b73ce408295ec45b5103365a47339 (diff)
Notes
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sade/config.c9
-rw-r--r--usr.sbin/sade/install.c16
-rw-r--r--usr.sbin/sade/menus.c2
-rw-r--r--usr.sbin/sade/sade.h1
-rw-r--r--usr.sbin/sysinstall/config.c9
-rw-r--r--usr.sbin/sysinstall/install.c16
-rw-r--r--usr.sbin/sysinstall/menus.c2
-rw-r--r--usr.sbin/sysinstall/sysinstall.h1
-rw-r--r--usr.sbin/sysinstall/user.c10
9 files changed, 59 insertions, 7 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c
index 35accc7b7624..62af84a40a34 100644
--- a/usr.sbin/sade/config.c
+++ b/usr.sbin/sade/config.c
@@ -385,6 +385,15 @@ configNTP(dialogMenuItem *self)
}
int
+configUsers(dialogMenuItem *self)
+{
+ dialog_clear_norefresh();
+ dmenuOpenSimple(&MenuUsermgmt, FALSE);
+ dialog_clear();
+ return DITEM_SUCCESS | DITEM_RESTORE;
+}
+
+int
configXFree86(dialogMenuItem *self)
{
if (file_executable("/usr/X11R6/bin/XF86Setup")) {
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 4db9e200ed02..15059e824e7b 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -600,6 +600,22 @@ installNovice(dialogMenuItem *self)
"to browse the collection now?"))
configPackages(self);
+ dialog_clear_norefresh();
+ if (!msgYesNo("Would you like to add any initial user accounts to the system?\n"
+ "Adding at least one account for yourself at this stage is suggested\n"
+ "since working as the \"root\" user is dangerous (it is easy to do\n"
+ "things which adversely affect the entire system)."))
+ configUsers(self);
+
+ dialog_clear_norefresh();
+ if (!msgYesNo("Would you like to set the system manager's password now?\n\n"
+ "This is the password you'll use to log in as \"root\".")) {
+ WINDOW *w = savescr();
+
+ systemExecute("passwd root");
+ restorescr(w);
+ }
+
/* XXX Put whatever other nice configuration questions you'd like to ask the user here XXX */
/* Give user the option of one last configuration spree */
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index 5e597fa7463a..9b786df787c4 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -343,7 +343,7 @@ whichMouse(dialogMenuItem *self)
if (!strcmp(self->prompt, "COM4"))
return !strcmp(buf, "/dev/cuaa3");
if (!strcmp(self->prompt, "BusMouse"))
- return !strcmp(buf, "/dev/msg0");
+ return !strcmp(buf, "/dev/mse0");
if (!strcmp(self->prompt, "PS/2"))
return !strcmp(buf, "/dev/psm0");
return FALSE;
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index fad3d48b4805..199ce9c4c868 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -396,6 +396,7 @@ extern int configPackages(dialogMenuItem *self);
extern int configSaver(dialogMenuItem *self);
extern int configSaverTimeout(dialogMenuItem *self);
extern int configNTP(dialogMenuItem *self);
+extern int configUsers(dialogMenuItem *self);
extern int configXFree86(dialogMenuItem *self);
extern int configRouter(dialogMenuItem *self);
extern int configSamba(dialogMenuItem *self);
diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c
index 35accc7b7624..62af84a40a34 100644
--- a/usr.sbin/sysinstall/config.c
+++ b/usr.sbin/sysinstall/config.c
@@ -385,6 +385,15 @@ configNTP(dialogMenuItem *self)
}
int
+configUsers(dialogMenuItem *self)
+{
+ dialog_clear_norefresh();
+ dmenuOpenSimple(&MenuUsermgmt, FALSE);
+ dialog_clear();
+ return DITEM_SUCCESS | DITEM_RESTORE;
+}
+
+int
configXFree86(dialogMenuItem *self)
{
if (file_executable("/usr/X11R6/bin/XF86Setup")) {
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 4db9e200ed02..15059e824e7b 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -600,6 +600,22 @@ installNovice(dialogMenuItem *self)
"to browse the collection now?"))
configPackages(self);
+ dialog_clear_norefresh();
+ if (!msgYesNo("Would you like to add any initial user accounts to the system?\n"
+ "Adding at least one account for yourself at this stage is suggested\n"
+ "since working as the \"root\" user is dangerous (it is easy to do\n"
+ "things which adversely affect the entire system)."))
+ configUsers(self);
+
+ dialog_clear_norefresh();
+ if (!msgYesNo("Would you like to set the system manager's password now?\n\n"
+ "This is the password you'll use to log in as \"root\".")) {
+ WINDOW *w = savescr();
+
+ systemExecute("passwd root");
+ restorescr(w);
+ }
+
/* XXX Put whatever other nice configuration questions you'd like to ask the user here XXX */
/* Give user the option of one last configuration spree */
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index 5e597fa7463a..9b786df787c4 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/sysinstall/menus.c
@@ -343,7 +343,7 @@ whichMouse(dialogMenuItem *self)
if (!strcmp(self->prompt, "COM4"))
return !strcmp(buf, "/dev/cuaa3");
if (!strcmp(self->prompt, "BusMouse"))
- return !strcmp(buf, "/dev/msg0");
+ return !strcmp(buf, "/dev/mse0");
if (!strcmp(self->prompt, "PS/2"))
return !strcmp(buf, "/dev/psm0");
return FALSE;
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index fad3d48b4805..199ce9c4c868 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -396,6 +396,7 @@ extern int configPackages(dialogMenuItem *self);
extern int configSaver(dialogMenuItem *self);
extern int configSaverTimeout(dialogMenuItem *self);
extern int configNTP(dialogMenuItem *self);
+extern int configUsers(dialogMenuItem *self);
extern int configXFree86(dialogMenuItem *self);
extern int configRouter(dialogMenuItem *self);
extern int configSamba(dialogMenuItem *self);
diff --git a/usr.sbin/sysinstall/user.c b/usr.sbin/sysinstall/user.c
index 7257795a17e0..1c1775058dda 100644
--- a/usr.sbin/sysinstall/user.c
+++ b/usr.sbin/sysinstall/user.c
@@ -108,7 +108,7 @@ static Layout groupLayout[] = {
/* The user configuration menu. */
static Layout userLayout[] = {
#define LAYOUT_UNAME 0
- { 3, 6, UT_NAMESIZE + 4, UT_NAMESIZE,
+ { 3, 6, UT_NAMESIZE, UT_NAMESIZE + 1,
"Login ID:", "The login name of the new user (mandatory)",
uname, STRINGOBJ, NULL },
#define LAYOUT_UID 1
@@ -356,7 +356,7 @@ userAddGroup(dialogMenuItem *self)
}
/* Draw a group entry box */
- draw_box(ds_win, USER_DIALOG_Y + 2, USER_DIALOG_X + 8, USER_DIALOG_HEIGHT - 6,
+ draw_box(ds_win, USER_DIALOG_Y + 2, USER_DIALOG_X + 8, USER_DIALOG_HEIGHT - 8,
USER_DIALOG_WIDTH - 17, dialog_attr, border_attr);
wattrset(ds_win, dialog_attr);
mvwaddstr(ds_win, USER_DIALOG_Y + 2, USER_DIALOG_X + 22, " Add a new group ");
@@ -379,7 +379,7 @@ reenter:
}
}
- if (!verifyGroupSettings())
+ if (!cancel && !verifyGroupSettings())
goto reenter;
/* Clear this crap off the screen */
@@ -678,7 +678,7 @@ userAddUser(dialogMenuItem *self)
}
/* Draw a user entry box */
- draw_box(ds_win, USER_DIALOG_Y + 1, USER_DIALOG_X + 3, USER_DIALOG_HEIGHT - 5,
+ draw_box(ds_win, USER_DIALOG_Y + 1, USER_DIALOG_X + 3, USER_DIALOG_HEIGHT - 6,
USER_DIALOG_WIDTH - 6, dialog_attr, border_attr);
wattrset(ds_win, dialog_attr);
mvwaddstr(ds_win, USER_DIALOG_Y + 1, USER_DIALOG_X + 22, " Add a new user ");
@@ -711,7 +711,7 @@ reenter:
}
}
- if (!verifyUserSettings(ds_win))
+ if (!cancel && !verifyUserSettings(ds_win))
goto reenter;
/* Clear this crap off the screen */