Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 911680

Summary: sys-block/tgt new init.d script
Product: Gentoo Linux Reporter: Forza <forza>
Component: Current packagesAssignee: Matthew Thode ( prometheanfire ) <prometheanfire>
Status: RESOLVED FIXED    
Severity: normal CC: cluster, forza
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch for init.d/tgtd
init.d/tgtd script
conf.d/tgtd config file
New init.d/tgtd script
Patch for init.d/tgtd

Description Forza 2023-08-03 17:51:36 UTC
Created attachment 866966 [details, diff]
Patch for init.d/tgtd

I have rewritten the init script for tgt because the existing one has some problems. The existing script is based on an example from upstream, but it was written for SysV init, and not OpenRC. It uses, for example $RUNLEVEL instead of $RC_RUNLEVEL.


The new script is using OpenRC functions, and (hopefully) correctly handles reboots and configuration changes.

Thanks
Comment 1 Forza 2023-08-03 17:52:51 UTC
Created attachment 866967 [details]
init.d/tgtd script
Comment 2 Forza 2023-08-03 17:53:32 UTC
Created attachment 866968 [details]
conf.d/tgtd config file
Comment 3 Forza 2023-08-04 08:07:11 UTC
Created attachment 867002 [details]
New init.d/tgtd script

Small update with shellcheck. Also remove some curly brackets that aren't needed.
Comment 4 Forza 2023-08-04 08:21:51 UTC
Created attachment 867003 [details, diff]
Patch for init.d/tgtd
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2023-08-04 15:47:50 UTC
I know it's asking more of you, but would you like to submit a pull request to https://github.com/gentoo/gentoo/  That would allow attributing the change to you.
Comment 7 Forza 2023-08-14 21:03:39 UTC
I made an updated PR at https://github.com/gentoo/gentoo/pull/32197
Comment 8 Larry the Git Cow gentoo-dev 2023-08-15 18:53:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a5c6ac8c88119c492a4a4dadcfce9aceb44b9a5

commit 3a5c6ac8c88119c492a4a4dadcfce9aceb44b9a5
Author:     Matthew Thode <prometheanfire@gentoo.org>
AuthorDate: 2023-08-15 18:53:02 +0000
Commit:     Matthew Thode <prometheanfire@gentoo.org>
CommitDate: 2023-08-15 18:53:02 +0000

    sys-block/tgt: make init scripts posix compliant
    
    Thanks to Forza-tng for the new scripts
    
    Closes: https://bugs.gentoo.org/911680
    Closes: https://bugs.gentoo.org/836690
    
    Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>

 sys-block/tgt/files/tgtd.confd-new |   7 ++
 sys-block/tgt/files/tgtd.initd-new | 136 +++++++++++++++++++++++++++++++++++++
 sys-block/tgt/tgt-1.0.87-r1.ebuild |  61 +++++++++++++++++
 3 files changed, 204 insertions(+)