I'm installing telegraf on my server and I noticed that the pkg_add fails
to install it:

dev# uname -a
OpenBSD dev 7.1 GENERIC#3 amd64
dev# pkg_add telegraf                                                           
                                                                                
                                               
quirks-5.5 signed on 2022-10-06T09:54:45Z
useradd: No such login class `telegraf'
system(/usr/sbin/useradd, -u, 826, -g, _telegraf, -L, telegraf, -c, telegraf 
user, -d, /var/empty, -s, /sbin/nologin, --, _telegraf) failed: exit(1)
telegraf-1.22.1: ok
The following new rcscripts were installed: /etc/rc.d/telegraf
See rcctl(8) for details.

I can see that login class is in /etc/login.conf.d/telegraf:

dev# ls -la /etc/login.conf.d
total 16
drwxr-xr-x   2 root  wheel   512 Oct  7 03:41 .
drwxr-xr-x  36 root  wheel  2048 Oct  7 03:42 ..
-rw-r--r--   1 root  wheel    45 Jun 24 12:12 postgresql
-rw-r--r--   1 root  wheel    40 Oct  7 03:41 telegraf

When I copy-paste the useradd line printed by pkg_add, it creates the user.
I suspect some sort of a race there.

This issue happens on latest 7.2-current with latest pkg from snapshot.

A bug in ports?

Attachment: signature.asc
Description: PGP signature

Reply via email to