diff options
Diffstat (limited to 'usr.sbin/bsdconfig/usermgmt/useradd')
-rwxr-xr-x | usr.sbin/bsdconfig/usermgmt/useradd | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/usr.sbin/bsdconfig/usermgmt/useradd b/usr.sbin/bsdconfig/usermgmt/useradd index 2d6b4d0..d372be4 100755 --- a/usr.sbin/bsdconfig/usermgmt/useradd +++ b/usr.sbin/bsdconfig/usermgmt/useradd @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2013 Devin Teske +# Copyright (c) 2012-2014 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,8 +33,11 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." "$0" f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/usermgmt/user.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" +f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && pgm="${ipgm:-$pgm}" @@ -55,9 +58,19 @@ done shift $(( $OPTIND - 1 )) # -# Chain-load to userinput to centralize code and minimize duplication +# Initialize # -$BSDCFG_LIBE/$APP_DIR/userinput ${USE_XDIALOG:+-X} mode="Add" +f_dialog_title "$msg_add $msg_user" +f_dialog_backtitle "${ipgm:+bsdconfig }$pgm" +f_mustberoot_init + +# +# Add a user +# +# NB: If given an argument on the command-line use it; otherwise fall-back to +# environment variable $user (handle $VAR_USER). +# +f_user_add ${1:+"$1"} ################################################################################ # END |