From d7e48fe643bc82ae6280193dc42f5fef7265abac Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 10 Mar 2011 20:24:28 -0500 Subject: [PATCH] rc_sys: let default behavior be automagic The default rc_sys behavior was changed to always require manual intervention by users. This pretty much breaks all of the diff system variants out there if people don't explicitly edit their rc.conf file ahead of time. We should have things work "out of the box" as much as possible and reasonable. X-Gentoo-Bug: 357247 X-Gentoo-Bug-URL: http://bugs.gentoo.org/357247 Signed-off-by: Mike Frysinger --- etc/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etc/Makefile b/etc/Makefile index 24e54550..314225a8 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -8,5 +8,14 @@ include ${MK}/os.mk include Makefile.${OS} include ${MK}/scripts.mk +# We can't use "ifndef" here because that treats set-but-empty +# as not-set which is not what we want +MKRCSYS ?= automagicplease +ifeq ($(MKRCSYS),automagicplease) +# If the user isn't picking a default, then have the +# config go with runtime automagic detection #357247 +rc.conf: SED_EXTRA += -e '/^rc_sys=""/s:^:\#:' +MKRCSYS = +endif rc.conf: rc.conf.in rc.conf.${OS} ${SED} ${SED_REPLACE} ${SED_EXTRA} $^ > $@