Bug 258190 - sysutils/nut: Fails to start after upgrading 13.0-RELEASE. Startup requires devfs
Summary: sysutils/nut: Fails to start after upgrading 13.0-RELEASE. Startup requires d...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Cy Schubert
URL:
Keywords: easy, needs-patch, regression
Depends on:
Blocks:
 
Reported: 2021-09-01 01:15 UTC by hsakamt
Modified: 2021-09-01 16:44 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (cy)
koobs: merge-quarterly?


Attachments
patch for rc script. (248 bytes, patch)
2021-09-01 01:56 UTC, hsakamt
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hsakamt 2021-09-01 01:15:38 UTC
Hi,

I'm using sysutils/nut with OMRON UPS(blazer_usb driver). 
I also set up /etc/devfs.conf like:
---
own ugen1.3 root:uucp
perm ugen1.3 0660
---
and it was fine to work on 11.4-RELEASE.

But after upgrading FreeBSD to 13.0-RELEASE. Start fails on boottime since /etc/rc.d/devfs kicked up after /usr/local/etc/rc.d/nut.

I changed rc script as:

--- files/nut.in.orig	2021-09-01 09:47:11.014756000 +0900
+++ files/nut.in	2021-09-01 09:47:34.144203000 +0900
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # PROVIDE: nut
-# REQUIRE: NETWORKING
+# REQUIRE: NETWORKING devfs
 # BEFORE: LOGIN
 # KEYWORD: shutdown

and it works fine again.

Best regards,
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-09-01 01:32:50 UTC
Thank you for your report and patch. Could you include your proposed change as an attachment, thanks!
Comment 2 hsakamt 2021-09-01 01:56:54 UTC
Created attachment 227581 [details]
patch for rc script.
Comment 3 hsakamt 2021-09-01 02:00:39 UTC
> Could you include your proposed change as an attachment, thanks!

Is this okey? Please let me know if something is wrong.
Comment 4 Cy Schubert freebsd_committer 2021-09-01 02:54:16 UTC
(In reply to hsakamt from comment #3)

Patch files are easy to apply, using patch(1) or git-apply(1), whereas inline text on a web page, like here in bugzilla must either be cut&pasted in by hand or typed in, and that is error prone.
Comment 5 Cy Schubert freebsd_committer 2021-09-01 03:00:08 UTC
This is some kind of timing issue. My RF1025 cycles from the USB device node appearing and disappearing, five seconds attached and another five seconds detached in a continuous loop until the device is opened by nut. This may be a workaround for that kind of behavior.
Comment 6 commit-hook freebsd_committer 2021-09-01 04:06:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8a2664421b9a3b2a5f8eb8408ad9d7f8df8dbc6c

commit 8a2664421b9a3b2a5f8eb8408ad9d7f8df8dbc6c
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-09-01 04:01:57 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2021-09-01 04:01:57 +0000

    sysutils/nut: Guarantee that devfs is started

    devfs does not always win the race with nut causing nut to fail to
    start in some installations.

    PR:             258190
    Submitted by:   hsakamt@tsnr.com
    Reported by:    hsakamt@tsnr.com

 sysutils/nut-devel/Makefile     | 1 +
 sysutils/nut-devel/files/nut.in | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
Comment 7 commit-hook freebsd_committer 2021-09-01 04:06:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=89602a6df642dbbfb42447355f8fb8a10641bcad

commit 89602a6df642dbbfb42447355f8fb8a10641bcad
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-09-01 03:59:48 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2021-09-01 03:59:48 +0000

    sysutils/nut: Guarantee that devfs is started

    devfs does not always win the race with nut causing nut to fail to
    start in some installations.

    PR:             258190
    Submitted by:   hsakamt@tsnr.com
    Reported by:    hsakamt@tsnr.com
    MFH:            2021Q3

 sysutils/nut/Makefile     | 2 +-
 sysutils/nut/files/nut.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 8 commit-hook freebsd_committer 2021-09-01 16:43:37 UTC
A commit in branch 2021Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0c645846a151ec8f7b8df644fdcfe232faf96f4f

commit 0c645846a151ec8f7b8df644fdcfe232faf96f4f
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-09-01 03:59:48 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2021-09-01 16:42:21 +0000

    sysutils/nut: Guarantee that devfs is started

    devfs does not always win the race with nut causing nut to fail to
    start in some installations.

    PR:             258190
    Submitted by:   hsakamt@tsnr.com
    Reported by:    hsakamt@tsnr.com

    (cherry picked from commit 89602a6df642dbbfb42447355f8fb8a10641bcad)

 sysutils/nut/Makefile     | 2 +-
 sysutils/nut/files/nut.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 9 Cy Schubert freebsd_committer 2021-09-01 16:44:24 UTC
Committed. Thanks for the patch.