1#!/bin/sh 2# 3# Copyright (c) 2002, 2003 Michael Telahun Makonnen. All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24# 25# Email: Mike Makonnen <mtm@identd.net> 26# |
27# $FreeBSD: head/usr.sbin/adduser/adduser.sh 116623 2003-06-20 16:52:06Z mtm $ |
28# 29 30# err msg 31# Display $msg on stderr, unless we're being quiet. 32# 33err() { 34 if [ -z "$quietflag" ]; then 35 echo 1>&2 ${THISCMD}: ERROR: $* --- 597 unchanged lines hidden (view full) --- 633 passwdtype="yes" 634 [ -n "$configflag" ] && break 635 trap 'stty echo; exit' 0 1 2 3 15 636 stty -echo 637 echo -n "Enter password: " 638 read -r upass 639 echo'' 640 echo -n "Enter password again: " |
641 read -r _passconfirm |
642 echo '' 643 stty echo 644 # if user entered a blank password 645 # explicitly ask again. 646 [ -z "$upass" -a -z "$_passconfirm" ] \ 647 && continue 648 ;; 649 [Yy][Ee][Ss]|[Yy][Ee]|[Yy]) --- 286 unchanged lines hidden --- |