Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 265029 Details for
Bug 357247
sys-apps/openrc-0.7.0 vserver guests fails to boot with rc_sys=""
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Allow distros who wants be backard compatible keep rc_sys_v1()
0001-Allow-distros-who-wants-be-backard-compatible-keep-r.patch (text/plain), 2.42 KB, created by
Natanael Copa
on 2011-03-07 12:09:51 UTC
(
hide
)
Description:
Allow distros who wants be backard compatible keep rc_sys_v1()
Filename:
MIME Type:
Creator:
Natanael Copa
Created:
2011-03-07 12:09:51 UTC
Size:
2.42 KB
patch
obsolete
>From 42929ec170926b44b04f2bf2d83ce8ce7e459db2 Mon Sep 17 00:00:00 2001 >From: Natanael Copa <ncopa@alpinelinux.org> >Date: Thu, 3 Mar 2011 18:16:50 +0000 >Subject: [PATCH] Allow distros who wants be backard compatible keep rc_sys_v1() > >Removing rc_sys_v1() will make some vserver guests fail to boot for >sure so we allow backwards compatibility for those who needs it. > >We also make sure we use rc_sys_v1() when rc_sys variable is defined >but empty. > >X-Gentoo-Bug: 357247 >X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=357247 > >X-Alpine-Bug: 538 >X-Alpine-Bug-URL: http://redmine.alpinelinux.org/issues/538 >--- > src/librc/librc.c | 30 ++++++++++++++++++++++++++++-- > 1 files changed, 28 insertions(+), 2 deletions(-) > >diff --git a/src/librc/librc.c b/src/librc/librc.c >index e134547..5733084 100644 >--- a/src/librc/librc.c >+++ b/src/librc/librc.c >@@ -42,6 +42,9 @@ const char librc_copyright[] = "Copyright (c) 2007-2008 Roy Marples"; > # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) > #endif > >+/* remove this line when rc_sys_v1 is to be removed as announced */ >+#define ENABLE_COMPAT_RC_SYS_AUTODETECT >+ > /* File stream used for plugins to write environ vars to */ > FILE *rc_environ_fd = NULL; > >@@ -242,8 +245,18 @@ rc_sys_v2(void) > } > librc_hidden_def(rc_sys_v2) > >+#ifdef ENABLE_COMPAT_RC_SYS_AUTODETECT > /* Old sys identification code. >- * Not to be used for any binaries outside of openrc. */ >+ * Not to be used for any binaries outside of openrc. >+ * >+ * The approach of autodetecing rc_sys during runtime is unreliable since >+ * some systems needs /proc to be mounted to be able to detect the system. >+ * Other systems, like LXC have no know way to be autodetected. >+ * >+ * Therefore this code is deprecated and only exists so distros have a >+ * chance to be backwards compatible if they want. >+ * >+ */ > const char * > rc_sys_v1(void) > { >@@ -292,14 +305,27 @@ librc_hidden_def(rc_sys_v1) > const char * > rc_sys(void) > { >- if (rc_conf_value("rc_sys")) { >+ /* make sure we dont call the unreliable rc_sys_v1() if rc_sys is >+ * defined in rc.conf and is not set to "" >+ */ >+ char *val = rc_conf_value("rc_sys"); >+ if (val && *val) { > return rc_sys_v2(); > } else { > return rc_sys_v1(); > } >+ return NULL; > } > librc_hidden_def(rc_sys) > >+#else /* ENABLE_COMPAT_RC_SYS_AUTODETECT */ >+const char * >+rc_sys(void) >+{ >+ return rc_sys_v2(); >+} >+#endif /* ENABLE_COMPAT_RC_SYS_AUTODETECT */ >+ > static const char * > rc_parse_service_state(RC_SERVICE state) > { >-- >1.7.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 357247
:
264599
|
264751
|
264781
| 265029 |
265525
|
265805