fix variable name
This commit is contained in:
parent
c655e092e8
commit
5adac1b4b3
|
@ -39,30 +39,30 @@ fi
|
||||||
|
|
||||||
# check for and set username
|
# check for and set username
|
||||||
if [[ -z "$username" ]]; then
|
if [[ -z "$username" ]]; then
|
||||||
stippeddomain=`echo $domain | sed 's|\.||'`
|
strippeddomain=`echo $domain | sed 's|\.||'`
|
||||||
stippeddomain=`echo $stippeddomain | sed 's|-||'`
|
strippeddomain=`echo $strippeddomain | sed 's|-||'`
|
||||||
username=`echo ${stippeddomain:0:8}`
|
username=`echo ${strippeddomain:0:8}`
|
||||||
if grep -q "^$username:" /etc/passwd; then
|
if grep -q "^$username:" /etc/passwd; then
|
||||||
# username already exists, try another
|
# username already exists, try another
|
||||||
username=`echo ${stippeddomain:0:7}`
|
username=`echo ${strippeddomain:0:7}`
|
||||||
if grep -q "^$username:" /etc/passwd; then
|
if grep -q "^$username:" /etc/passwd; then
|
||||||
# username already exists, try another
|
# username already exists, try another
|
||||||
username=`echo ${stippeddomain:0:6}`
|
username=`echo ${strippeddomain:0:6}`
|
||||||
if grep -q "^$username:" /etc/passwd; then
|
if grep -q "^$username:" /etc/passwd; then
|
||||||
# username already exists, try another
|
# username already exists, try another
|
||||||
username=`echo ${stippeddomain:0:5}`
|
username=`echo ${strippeddomain:0:5}`
|
||||||
if grep -q "^$username:" /etc/passwd; then
|
if grep -q "^$username:" /etc/passwd; then
|
||||||
# username already exists, try another
|
# username already exists, try another
|
||||||
username=`echo ${stippeddomain:0:9}`
|
username=`echo ${strippeddomain:0:9}`
|
||||||
if grep -q "^$username:" /etc/passwd; then
|
if grep -q "^$username:" /etc/passwd; then
|
||||||
# username already exists, try another
|
# username already exists, try another
|
||||||
username=`echo ${stippeddomain:0:10}`
|
username=`echo ${strippeddomain:0:10}`
|
||||||
if grep -q "^$username:" /etc/passwd; then
|
if grep -q "^$username:" /etc/passwd; then
|
||||||
# username already exists, try another
|
# username already exists, try another
|
||||||
username=`echo ${stippeddomain:0:11}`
|
username=`echo ${strippeddomain:0:11}`
|
||||||
if grep -q "^$username:" /etc/passwd; then
|
if grep -q "^$username:" /etc/passwd; then
|
||||||
# username already exists, try another
|
# username already exists, try another
|
||||||
username=`echo ${stippeddomain:0:12}`
|
username=`echo ${strippeddomain:0:12}`
|
||||||
if grep -q "^$username:" /etc/passwd; then
|
if grep -q "^$username:" /etc/passwd; then
|
||||||
echo "trouble setting unique username, specify '-u USERNAME' to use an existing username"
|
echo "trouble setting unique username, specify '-u USERNAME' to use an existing username"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user