Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 533418 - sys-process/runit - fix chpst path and boot default run level
Summary: sys-process/runit - fix chpst path and boot default run level
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL: http://forums.gentoo.org/viewtopic-p-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-23 22:26 UTC by tokiclover
Modified: 2016-11-10 23:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
stage 1 (1,144 bytes, application/x-shellscript)
2014-12-25 18:11 UTC, tokiclover
Details
stage 2 (2,386 bytes, application/x-shellscript)
2014-12-25 18:11 UTC, tokiclover
Details
stage 3 (3,366 bytes, application/x-shellscript)
2014-12-25 18:12 UTC, tokiclover
Details
stage 2 (2,499 bytes, application/x-shellscript)
2014-12-26 22:53 UTC, tokiclover
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tokiclover 2014-12-23 22:26:57 UTC
chpst path should be fixed to be the actual path and not start with `/usr' prefix which is wrong and would potentienly lead to unbootable system.

Secondly, a service with rc default runlevel would not hurt to have a usable set up out of the box. So having this:
--
cat > /etc/sv/default/run <<-EOF
#!/bin/sh
/sbin/rc default
EOF
--

And lastly, seting up `/service/' dir to have something working out of the box would be nice.
--
for dir in getty-tty{1,2,3,4,5,6} default; do
    dosym /etc/{sv,service}/${dir}
done
--

Thanks.
Comment 1 tokiclover 2014-12-24 10:12:40 UTC
Jut pilling up another sugar nicety to have.

---
cat >/etc/runit/2 <<-EOF
#!/bin/sh

PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin

SV_SVCDIR=/etc/service
SV_RUNDIR=/run/runsvdir
mkdir -p /run
rm -fr "${SV_RUNDIR}"
cp -a "${SV_SVCDIR}" "${SV_RUNDIR}"

exec env - PATH=$PATH \
runsvdir "${SV_RUNDIR}" \
'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
EOF
---

getty is the only bundled service. And `runsvdir' does scaning every 5 secconds or so. Lets avoid unecessary disk seeks. And this makes sense because OpenRC does the equivalent of this as well.

Thanks.
Comment 2 tokiclover 2014-12-24 10:28:07 UTC
There is an issue when having
Comment 3 tokiclover 2014-12-24 10:32:20 UTC
There is an issue when having `rc default' as service because it will be supervised and will prevent any switch to another runlevel. So, that command should be added to `/etc/runit/2' instead.

The first post in the forums thread recommands puting it in '/etc/runit/1' but there is an issue with that as well. (It's described there.)
Comment 4 tokiclover 2014-12-25 18:11:07 UTC
Created attachment 392386 [details]
stage 1

Lets post the files to avoid confusions.
Comment 5 tokiclover 2014-12-25 18:11:33 UTC
Created attachment 392388 [details]
stage 2
Comment 6 tokiclover 2014-12-25 18:12:13 UTC
Created attachment 392390 [details]
stage 3
Comment 7 tokiclover 2014-12-26 22:53:10 UTC
Created attachment 392466 [details]
stage 2

Replaced `rd default &' (no safe background task) with a more safe variant with
nonetwork/single runlevels supports.
Comment 8 William Hubbs gentoo-dev 2015-02-01 18:55:51 UTC
Hello,

I'm sorry it took me so long to respond to this.

I count at least four issues in this bug report, maybe more. Some of which appear to be "nice to have", some I'm not sure about, and at least one may be critical.

The title mentions one (maybe two), comment #0 lists three, and several more are added in later comments.

Piling multiple issues in a single bug report may appear to be the simplest way to get them fixed; however, it makes it very difficult for a maintainer to prioritize the bug report and track the fix.

In the future, please file one bug report per issue.

For this bug report, please point out the most important issue, and I'll focus on fixing that then close it.

Thanks,

William
Comment 9 tokiclover 2015-02-23 22:44:51 UTC
Sorry for the delay... to respond. Well, leaving this 'as is' to you,--decide what to do with this bug request,--because I was too busy to document runit, daemontools[-encore], s6 & (process-)supervision on the (official) Wiki first; and then ended up by writing supervision-scripts[1] lately.

My guess is that, what I document in the Wiki (Init-Stage-[123], almost similar to the files attached here,) would be enough to get a functional setup to replace SysVinit. So, feel free to sync to it.

I've added an ebuild[2] for [1] to experiment... but the installation would conflict with existent files... so a user should decide keeping the files provided by Runit package or opt for [2].

Thanks.

[1]: https://github.com/tokiclover/supervision-scripts
[2]: https://github.com/tokiclover/bar-overlay
Comment 10 William Hubbs gentoo-dev 2016-11-10 23:00:04 UTC
Hello,

I need you to take a look at 2.1.2-r1.
This version drops the use of chpst everywhere.

Once you have this version downloaded, take a look and let me know what
other changes you suggest and I'll take a look.

Thanks,

William