Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
Use -z for empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
taecilla committed Feb 3, 2016
1 parent 56bafdd commit 83efcb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions local/set-up.sh
Expand Up @@ -8,7 +8,7 @@ while :
do
echo "Enter hostname:"
read HOSTNAME
if [[ "${HOSTNAME}" != "" ]]; then
if [[ -z "${HOSTNAME}" ]]; then
echo "${HOSTNAME}" > /etc/hostname
break
fi
Expand Down Expand Up @@ -39,7 +39,7 @@ while :
do
echo "Enter user name:"
read USERNAME
if [[ "${USERNAME}" != "" ]]; then
if [[ -z "${USERNAME}" ]]; then
useradd -m -G wheel -s /bin/bash ${USERNAME}
passwd ${USERNAME}
break
Expand Down

0 comments on commit 83efcb0

Please sign in to comment.