Complain about loading /etc/conf.d/rc

Openrc was quietly loading this file if it existed and this was causing
some issues, so now openrc loads the file and complains about it.

Hopefully the warning message will convince everyone to remove this file
and migrate the settings to @SYSCONFDIR@/rc.conf where they belong.
This commit is contained in:
William Hubbs 2012-01-30 13:12:40 -06:00
parent 0ff23f20e8
commit 7da8394a8e

View File

@ -392,10 +392,13 @@ rc_conf_value(const char *setting)
atexit(_free_rc_conf); atexit(_free_rc_conf);
#endif #endif
/* Support old configs */ /* Support old configs, but complain about it. */
if (exists(RC_CONF_OLD)) { if (exists(RC_CONF_OLD)) {
old = rc_config_load(RC_CONF_OLD); old = rc_config_load(RC_CONF_OLD);
TAILQ_CONCAT(rc_conf, old, entries); TAILQ_CONCAT(rc_conf, old, entries);
ewarn("Your system still has %s", RC_CONF_OLD);
ewarn("Please migrate to the appropriate settings in %s", RC_CONF);
ewarn("and delete %s.", RC_CONF_OLD);
#ifdef DEBUG_MEMORY #ifdef DEBUG_MEMORY
free(old); free(old);
#endif #endif