Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 692006 - OpenRC should create /run/openrc/exclusive when missing
Summary: OpenRC should create /run/openrc/exclusive when missing
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-12 17:56 UTC by Thomas Deutschmann (RETIRED)
Modified: 2019-08-29 20:11 UTC (History)
0 users

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


Attachments
fix-verify-boot.patch (fix-verify-boot.patch,1.36 KB, patch)
2019-08-29 17:11 UTC, William Hubbs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2019-08-12 17:56:35 UTC
1. Download and extract current stage3.

2. Chroot into extracted stage3.

3. Try to start a service, `/etc/init.d/rsyncd start` for example.

This will softfail with a warning:

> # /etc/init.d/rsyncd start
>  * WARNING: rsyncd is already starting

Now create '/run/openrc/exclusive' and retry

> # mkdir -p /run/openrc/exclusive
> # /etc/init.d/rsyncd start
> * Caching service dependencies ...
> Service `netmount' needs non existent service `net'     [ ok ]
>  * You are attempting to run an openrc service on a
>  * system which openrc did not boot.
>  * You may be inside a chroot or you may have used
>  * another initialization system to boot this system.
>  * In this situation, you will get unpredictable results!
>  * If you really want to do this, issue the following command:
>  * touch /run/openrc/softlevel
>  * ERROR: rsyncd failed to start

Once '/run/openrc/exclusive' exists, OpenRC will create all other necessary directories and will show an expected useful error.

But why doesn't OpenRC create '/run/openrc/exclusive' when missing? Just showing

>  * WARNING: rsyncd is already starting

is wrong.
Comment 1 William Hubbs gentoo-dev 2019-08-21 15:43:02 UTC
I agree that the error message is misleading. However, I do not agree
with  your remedy.

I will take a look at verify_boot and see if there is a way I can
improve it.
Comment 2 William Hubbs gentoo-dev 2019-08-29 17:11:20 UTC
Created attachment 588516 [details, diff]
fix-verify-boot.patch

This patch should fix the issue.
Can you please test by applying this?

We need to make sure it doesn't affect a normal system, but the message
should show up when you try to do anything with a service inside a
chroot.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2019-08-29 20:11:32 UTC
Not sure what the patch should do:

I am chrooted into stage3.

Patched OpenRC.

/run is empty.

I do `/etc/init.d/rsyncd start` and still get

> * WARNING: rsyncd is already starting

like reported in comment 0.