diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 17f49aae..0e895c9b 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -715,14 +715,15 @@ 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) -if [ \${#users_list[@]} -gt 0 ]; then +no_of_users=\$(echo "\$users_list" | wc -l) +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 echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/Users.desktop - if [ \${#users_list[@]} -lt 2 ]; then - echo "Name=\${#users_list[@]} User" >> /home/$MY_USERNAME/Desktop/Users.desktop + if [ \$no_of_users -lt 2 ]; then + echo "Name=\$no_of_users User" >> /home/$MY_USERNAME/Desktop/Users.desktop else - echo "Name=\${#users_list[@]} Users" >> /home/$MY_USERNAME/Desktop/Users.desktop + echo "Name=\$no_of_users Users" >> /home/$MY_USERNAME/Desktop/Users.desktop fi echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/Users.desktop echo 'Comment=List of users' >> /home/$MY_USERNAME/Desktop/Users.desktop