home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
ddjmag
/
ddj8706.arc
/
BBS.L7
< prev
next >
Wrap
Text File
|
1987-05-05
|
3KB
|
133 lines
Listing Seven
.profile From the Account new
# set default path to an empty rbin directory
1 PATH=/u/bbs/new/rbin
# set level one prompt to remind users how to log off
2 PS1='Type CNTRL-D now... '
# display the welcome message
3 cat msg1
4 echo
# make sure the user really wants an account
5 echo "Do you wish to request a login? (Y/N) \c"
6 read choice
# continue only if the user answers yes
7 if [ "$choice" = y -o "$choice" = Y ]
8 then
9 echo
10 OK="N"
# loop until user is satisfied with data
11 while [ "$OK" != Y -a "$OK" != y ]
12 do
# collect user name, address, etc.
13 echo "Enter your real name: \c"
14 read realname
15 echo
16 echo "Enter the first line of your mailing address: (4 lines are available)"
17 read address1
18 echo
19 echo "Enter the second line of your mailing address: <cr> if none"
20 read address2
21 echo
22 echo "Enter the third line of your mailing address: <cr> if none"
23 read address3
24 echo
25 echo "Enter the fourth line of your mailing address: <cr> if none"
26 read address4
27 echo
28 echo "Enter your voice telephone number: \c"
29 read phone
30 echo
# display the data entered for the user
31 echo "This is what you have entered:"
32 echo
33 echo $realname
34 echo
35 echo $address1
36 echo $address2
37 echo $address3
38 echo $address4
39 echo
40 echo $phone
41 echo
# ask the user to verify the data
42 echo "Is this correct? (Y/N) \c"
43 read OK
44 done
45 OK="N"
# loop until user is happy
46 while [ "$OK" != Y -a "$OK" != y ]
47 do
# collect the account data
48 echo
49 echo "Enter a one word login name: \c"
50 read lognmae
51 echo
52 echo "Enter an initial password: \c"
53 read initpasswd
54 echo
# display the entered data for the user
55 echo "You have entered:"
56 echo
57 echo $logname
58 echo $initpasswd
59 echo
# ask the user to verify the data
60 echo "Is this correct? (Y/N) \c"
61 read OK
62 done
63 echo
# write the new account data to a holding file
64 echo $realname >>signups
65 echo $address1 >>signups
66 echo $address2 >>signups
67 echo $address3 >>signups
68 echo $address4 >>signups
69 echo $phone >>signups
70 echo $logname >>signups
71 echo $initpasswd >>signups
72 echo >>signups
# tell the user that he or she is finished
73 echo "This completes the login request process. You'll receive an account"
74 echo "confirmation through the mail within a week."
75 echo
76 fi
# tell the user to log off
77 echo
78 echo "Enter CTNRL-D to log off the system."
79 echo