projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add dnsTTL host attribute to override the zone default TTL for A and AAAA records...
[mirror/userdir-ldap.git]
/
ud-useradd
diff --git
a/ud-useradd
b/ud-useradd
index
2f24201
..
c183dca
100755
(executable)
--- a/
ud-useradd
+++ b/
ud-useradd
@@
-155,7
+155,9
@@
Res = raw_input("First name [" + cn + "]? ");
if Res != "":
cn = Res;
Res = raw_input("Middle name [" + mn + "]? ");
if Res != "":
cn = Res;
Res = raw_input("Middle name [" + mn + "]? ");
-if Res != "":
+if Res == " ":
+ mn = ""
+elif Res != "":
mn = Res;
Res = raw_input("Last name [" + sn + "]? ");
if Res != "":
mn = Res;
Res = raw_input("Last name [" + sn + "]? ");
if Res != "":
@@
-239,14
+241,14
@@
encto = ''
try:
encto = FullName.decode('us-ascii')
except UnicodeError:
try:
encto = FullName.decode('us-ascii')
except UnicodeError:
- encto =
email.Header.Header(FullName, 'utf-8', 200
) + " " + emailaddr
+ encto =
str(email.Header.Header(FullName, 'utf-8', 200)
) + " " + emailaddr
subjstring = "New Debian Maintainer " + FullName
encsubj = ''
try:
encsubj = subjstring.decode('us-ascii')
except UnicodeError:
subjstring = "New Debian Maintainer " + FullName
encsubj = ''
try:
encsubj = subjstring.decode('us-ascii')
except UnicodeError:
- encsubj =
email.Header.Header(subjstring, 'utf-8', 200
)
+ encsubj =
str(email.Header.Header(subjstring, 'utf-8', 200)
)
Subst["__HEADER_SUBJ__"] = encsubj
Subst["__HEADER_EMAIL"] = encto
Subst["__HEADER_SUBJ__"] = encsubj
Subst["__HEADER_EMAIL"] = encto
@@
-324,7
+326,7
@@
if Update == 1 and ForceMail == 0:
# Send the Welcome message
print "Sending Welcome Email"
# Send the Welcome message
print "Sending Welcome Email"
-Reply = TemplateSubst(Subst,open(TemplatesDir + "/welcome-message-%d" %
gidNumber
, "r").read())
+Reply = TemplateSubst(Subst,open(TemplatesDir + "/welcome-message-%d" %
int(gidNumber)
, "r").read())
Child = os.popen("/usr/sbin/sendmail -t","w");
#Child = os.popen("cat","w");
Child.write(Reply);
Child = os.popen("/usr/sbin/sendmail -t","w");
#Child = os.popen("cat","w");
Child.write(Reply);