Wayne Blaszczyk wrote: > On 15/12/11 16:28, Bruce Dubbs wrote: >> Wayne, >> >> In the D-BUS instructions, what does this mean? >> >> useradd -c "D-BUS Message Daemon User" -d /dev/null \ >> -u 18 -g messagebus -s /bin/false messagebus || [ $? == 9 ] >> >> Accidental update from a script? >> >> -- Bruce > > No, not accidental. It means add user but if user already exists then > don't return an error.
It's not consistent with the rest of the book. There are about 30 other places in the book that do useradd. It really doesn't matter if the command errors out for a duplicate user. In fact, I think it would be better if it did. Your construct will not detect if the user tries to run the command as a non-root user. In a script, I'd probably grep for messagebus in /etc/passwd if I wanted to see if the user already existed. Also, the construct is not explained. I think it should be removed. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page