How to fix "updatedb: can not find group ` mlocate'" on entware?

The addgroup package is necessary and is included in busybox of padavan firmware.

Do the following steps as root:

grep -s mlocate /etc/group || addgroup mlocate
chgrp mlocate /opt/var/mlocate
chmod g=rx,o= /opt/var/mlocate
chgrp mlocate /opt/bin/locate
chmod g+s,go-w /opt/bin/locate
touch /opt/var/mlocate/mlocate.db
chgrp mlocate /opt/var/mlocate/mlocate.db

This is the one-liner (a single copy and paste command) to fix the "updatedb: can not find group mlocate" message:

# grep -s mlocate /etc/group || addgroup mlocate;chgrp mlocate /opt/var/mlocate;chmod g=rx,o= /opt/var/mlocate;chgrp mlocate /opt/bin/locate;chmod g+s,go-w /opt/bin/locate;touch /opt/var/mlocate/mlocate.db;chgrp mlocate /opt/var/mlocate/mlocate.db