Date: Sat, 05 Jan 2019 02:13:17 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 234627] devel/py-buildbot-worker: Fails to startup on boot: /etc/rc: Permission denied (due to use of $0) Message-ID: <bug-234627-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234627 Bug ID: 234627 Summary: devel/py-buildbot-worker: Fails to startup on boot: /etc/rc: Permission denied (due to use of $0) Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: koobs@FreeBSD.org Depends on: 234614 In ports r484380 I switched from using %%PREFIX%%/etc/${name} to $0 in the = rc script for the profile mechanism, in order to: Fix startup script to use the filename of itself (the executed script), not a filename that uses the ${name} variable, which doesnt exist as it contains an underscore (not a dash), causing the following error when executed: /usr/local/etc/rc.d/buildbot-worker: /usr/local/etc/rc.d/buildbot_worke= r: not found I forgot that using $0 causes issues on boot, as $0 is not the rc scripts filename when run via /etc/rc, it is 'etc/rc' instead. After talking with Kyle about correct/permanent solutions to the issue, bug 234614 now tracks a new feature in rc to provide a variable for scripts to = use to self-reference themselves for profile or other mechanisms.=20 I'll wait until that feature is finalised, and plug in (copy) the same functionality for temporary use directly in this ports rc script, until all supported FreeBSD versions carry the new feature. Referenced Bugs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234614 [Bug 234614] rc framework should provide RC_SERVICE analog --=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-234627-7788>