Convert rc_sys() calls to detect_container() and detect_vm()

This commit is contained in:
William Hubbs
2015-12-07 17:56:02 -06:00
parent 8addd7913a
commit 9f6e05671d
4 changed files with 28 additions and 8 deletions

View File

@@ -753,7 +753,7 @@ rc_deptree_update(void)
char *depend, *depends, *service, *type, *nosys, *onosys;
size_t i, k, l;
bool retval = true;
const char *sys = rc_sys();
const char *sys = NULL;
struct utsname uts;
/* Some init scripts need RC_LIBEXECDIR to source stuff
@@ -860,6 +860,9 @@ rc_deptree_update(void)
/* Phase 2 - if we're a special system, remove services that don't
* work for them. This doesn't stop them from being run directly. */
sys = detect_container();
if (!sys)
sys = detect_vm();
if (sys) {
len = strlen(sys);
nosys = xmalloc(len + 2);