diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 120dfd6d..adcbc467 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -715,7 +715,11 @@ function configure_user_interface { cat < $rootdir/usr/bin/list-tox-users #!/bin/bash users_list=\$(lstox | awk -F ' ' '{\$1=""; print \$0}' | sed -e 's/^[[:space:]]*//' | sort -d) -no_of_users=\$(echo "\$users_list" | wc -l) +if [ ! \$users_list ]; then + no_of_users=0 +else + no_of_users=\$(echo "\$users_list" | wc -l) +fi if [ \$no_of_users -gt 0 ]; then echo "\$users_list" > /home/$MY_USERNAME/Users.txt chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Users.txt