diff options
author | jkh <jkh@FreeBSD.org> | 1997-01-15 03:57:50 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-01-15 03:57:50 +0000 |
commit | e2cfd8f2e119529932a7147d437780e6bfea31d8 (patch) | |
tree | e29631ff0b3fd1b26781605d2e641679637f04af | |
parent | bd31923ccfcab594b5b0cc878a8bd624d13bbdf4 (diff) | |
download | FreeBSD-src-e2cfd8f2e119529932a7147d437780e6bfea31d8.zip FreeBSD-src-e2cfd8f2e119529932a7147d437780e6bfea31d8.tar.gz |
Fix several problems:
1. Bus mouse selection didn't show up properly in mouse menu.
2. U&G management screen didn't respect cancel properly.
3. Novice not prompted to add users or set root password during installation.
4. Username length changes screw up user management form.
-rw-r--r-- | release/sysinstall/config.c | 9 | ||||
-rw-r--r-- | release/sysinstall/install.c | 16 | ||||
-rw-r--r-- | release/sysinstall/menus.c | 2 | ||||
-rw-r--r-- | release/sysinstall/sysinstall.h | 1 | ||||
-rw-r--r-- | release/sysinstall/user.c | 10 | ||||
-rw-r--r-- | usr.sbin/sade/config.c | 9 | ||||
-rw-r--r-- | usr.sbin/sade/install.c | 16 | ||||
-rw-r--r-- | usr.sbin/sade/menus.c | 2 | ||||
-rw-r--r-- | usr.sbin/sade/sade.h | 1 | ||||
-rw-r--r-- | usr.sbin/sysinstall/config.c | 9 | ||||
-rw-r--r-- | usr.sbin/sysinstall/install.c | 16 | ||||
-rw-r--r-- | usr.sbin/sysinstall/menus.c | 2 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 1 | ||||
-rw-r--r-- | usr.sbin/sysinstall/user.c | 10 |
14 files changed, 91 insertions, 13 deletions
diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index 35accc7..62af84a 100644 --- a/release/sysinstall/config.c +++ b/release/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/release/sysinstall/install.c b/release/sysinstall/install.c index 4db9e20..15059e8 100644 --- a/release/sysinstall/install.c +++ b/release/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/release/sysinstall/menus.c b/release/sysinstall/menus.c index 5e597fa..9b786df 100644 --- a/release/sysinstall/menus.c +++ b/release/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/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index fad3d48..199ce9c 100644 --- a/release/sysinstall/sysinstall.h +++ b/release/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/release/sysinstall/user.c b/release/sysinstall/user.c index 7257795..1c17750 100644 --- a/release/sysinstall/user.c +++ b/release/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 */ diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index 35accc7..62af84a 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 4db9e20..15059e8 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 5e597fa..9b786df 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 fad3d48..199ce9c 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 35accc7..62af84a 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 4db9e20..15059e8 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 5e597fa..9b786df 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 fad3d48..199ce9c 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 7257795..1c17750 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 */ |