add setting of root's shell, from Julio Merino in install/17676 with
minor changes by me.
This commit is contained in:
parent
56ad586e08
commit
f9419717d2
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: defs.h,v 1.70 2002/06/06 09:53:22 lukem Exp $ */
|
||||
/* $NetBSD: defs.h,v 1.71 2002/07/29 03:05:16 grant Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -115,6 +115,7 @@ EXTERN int layoutkind;
|
|||
EXTERN int sizemult INIT(1);
|
||||
EXTERN const char *multname;
|
||||
EXTERN const char *doingwhat;
|
||||
EXTERN const char *shellpath;
|
||||
|
||||
/* loging variables */
|
||||
|
||||
|
@ -361,6 +362,7 @@ int sanity_check (void);
|
|||
int set_timezone (void);
|
||||
int set_crypt_type (void);
|
||||
int set_root_password (void);
|
||||
int set_root_shell (void);
|
||||
void scripting_fprintf(FILE *, const char *, ...);
|
||||
void scripting_vfprintf(FILE *, const char *, va_list);
|
||||
void add_rc_conf(const char *, ...);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: install.c,v 1.28 2002/04/04 14:26:44 ad Exp $ */
|
||||
/* $NetBSD: install.c,v 1.29 2002/07/29 03:05:16 grant Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -141,6 +141,7 @@ do_install()
|
|||
set_crypt_type();
|
||||
|
||||
set_root_password();
|
||||
set_root_shell();
|
||||
|
||||
sanity_check();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: menus.mi.en,v 1.55 2002/07/29 02:51:07 grant Exp $ */
|
||||
/* $NetBSD: menus.mi.en,v 1.56 2002/07/29 03:05:16 grant Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -457,3 +457,7 @@ menu dhcpautoconf, title "Perform DHCP autoconfiguration?";
|
|||
option "Yes", exit, action {yesno = 1;};
|
||||
option "No", exit, action {yesno = 0;};
|
||||
|
||||
menu rootsh, title "Root shell";
|
||||
option "/bin/csh", exit, action {shellpath = "/bin/csh";};
|
||||
option "/bin/ksh", exit, action {shellpath = "/bin/ksh";};
|
||||
option "/bin/sh", exit, action {shellpath = "/bin/sh";};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: msg.mi.en,v 1.89 2002/07/29 02:51:07 grant Exp $ */
|
||||
/* $NetBSD: msg.mi.en,v 1.90 2002/07/29 03:05:16 grant Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -844,6 +844,10 @@ message rootpw
|
|||
{The root password of the newly installed system has not yet been initialized,
|
||||
and is thus empty. Do you want to set a root password for the system now?}
|
||||
|
||||
message rootsh
|
||||
{You can now select which shell to use for the root user. The default is
|
||||
/bin/csh, but you may prefer another one.}
|
||||
|
||||
message label_size_special
|
||||
{
|
||||
Special values that can be entered for the size value:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: util.c,v 1.72 2002/06/29 20:04:56 scottr Exp $ */
|
||||
/* $NetBSD: util.c,v 1.73 2002/07/29 03:05:17 grant Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -1107,6 +1107,15 @@ set_root_password()
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
set_root_shell()
|
||||
{
|
||||
msg_display(MSG_rootsh);
|
||||
process_menu(MENU_rootsh);
|
||||
run_prog(RUN_DISPLAY|RUN_CHROOT, NULL, "chpass -s %s root", shellpath);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
scripting_vfprintf(FILE *f, const char *fmt, va_list ap)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue