Date: Tue, 03 Aug 2021 13:12:50 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 257586] [service] does not restart [devd] when called from a pkg-install script Message-ID: <bug-257586-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257586 Bug ID: 257586 Summary: [service] does not restart [devd] when called from a pkg-install script Product: Base System Version: 12.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: bsdpr@phoe.frmug.org Note: I'm unsure where to file this bug report, either in base or ports. On a 12.2-STABLE host (rev 8b9b3d90de5dbeba0f8d68a154c657c0c139e5a9) I experience troubles when running service(8) to restart devd(8) within a pkg-install or pkg-deinstall script: devd is stopped but it fails to proper= ly restart. My pkg-install script is as shown bellow, the deinstall is almost identical apart from s/POST-INSTALL/POST-DEINSTALL/: #!/bin/sh=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 SERVICE=3D/usr/sbin/service if [ "$2" =3D POST-INSTALL ] ; then ${SERVICE} devd restart ${SERVICE} devd status fi When installing I observe that devd does not last long: # service devd status ; /usr/bin/make install ; echo postmake ; service devd status devd is running as pid 13426. =3D=3D=3D> Installing for uartdevconf-1.0 =3D=3D=3D> Checking if uartdevconf is already installed =3D=3D=3D> Registering installation for uartdevconf-1.0 Installing uartdevconf-1.0... Stopping devd. Waiting for PIDS: 13426. Starting devd. devd is running as pid 13514. postmake devd is not running. When starting (or restarting) devd after installation, from outside of the package installation environment, it lasts: # service devd status ; /usr/bin/make install ; echo postmake ; service devd status ; service devd start ; sleep 2 ; service devd status devd is running as pid 13983. =3D=3D=3D> Installing for uartdevconf-1.0 =3D=3D=3D> Checking if uartdevconf is already installed =3D=3D=3D> Registering installation for uartdevconf-1.0 Installing uartdevconf-1.0... Stopping devd. Waiting for PIDS: 13983. Starting devd. devd is running as pid 14077. postmake devd is not running. Starting devd. devd is running as pid 14114. That is a showstopper because this port/package relies on a set of devd rul= es for correct operation. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-257586-227>