From: victor romanchuk <rom@persimplex.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Two issues with OpenRC/baselayout2 migration on a hosted VM
Date: Wed, 14 Dec 2011 18:29:07 +0400 [thread overview]
Message-ID: <4EE8B2B3.2020106@persimplex.net> (raw)
In-Reply-To: <CAA2qdGVZFghWUgyr25boPa102gVTqTkXM2Od-uq5ME98_qiNbw@mail.gmail.com>
Pandu Poluan wrote, at 12/13/2011 10:26 PM:
>
>
> On Dec 14, 2011 1:06 AM, "Tanstaafl" <tanstaafl@libertytrek.org
> <mailto:tanstaafl@libertytrek.org>> wrote:
> >
> > What should I set this to? Assuming that Linode is indeed using Xen, would
> it be:
> >
> > rc_sys="xenU"
> >
> > ?
>
> AFAIK Linode uses Xen so "xenU" is correct.
>
> What I really want to know is what happens if we specify a 'wrong' rc_sys value...
>
> (I also want to know why 'rc -S' is so unhelpful, but not as much as the above.)
>
i have looked through openrc sources and experimented a bit; the idea of rc_sys
is simple: the contents of that variable affects 'keyword' dependencies in
/etc/init.d/ scripts. the feature is documented, see runscript(8) for details,
but apparently does not work as expected. i also did not find valuable 'keyword'
dependencies in software packages i use thus considered that rc_sys might be set
to any value with no side effects
another thing i found is an $RC_SYS environment variable available to all
scripts initiated by rc; that one is set to value defined in /etc/rc.conf or
automatically detected if rc_sys is not explicitly set. the automatic detection
is trivial, eg. if the directory "/proc/xen" does exist, then $SYS_RC is set to
XENU. setting of $SYS_RC to XEN0 would be in case of "/proc/xen" existence and
if contents of the file /proc/xen/capabilities is equal to "control-d". all that
stuff could be found in src/librc/librc.c
i'm using $RC_SYS as a flag controlling start of xen dom0 daemons: rc_sys is
commented out in /etc/rc.conf to let runscript autodetect the environment. all
xen related stuff is started from /etc/local.d, like that:
$ cat /etc/local.d/xen.start
if [ "x$RC_SYS" = "xXEN0" ]; then
# start xenstored, xenconsole, configure xen networking etc
else
# do something else related to baremetal os boot
fi
this slightly speeds up boot process and produces more clear logs
prev parent reply other threads:[~2011-12-14 14:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 18:03 [gentoo-user] Two issues with OpenRC/baselayout2 migration on a hosted VM Tanstaafl
2011-12-13 18:26 ` Pandu Poluan
2011-12-13 19:50 ` Tanstaafl
2011-12-13 20:21 ` Neil Bothwick
2011-12-13 20:42 ` Tanstaafl
2011-12-13 21:29 ` Neil Bothwick
2011-12-14 14:29 ` victor romanchuk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EE8B2B3.2020106@persimplex.net \
--to=rom@persimplex.net \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox