openrc/etc/Makefile
Mike Frysinger d7e48fe643 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 <vapier@gentoo.org>
2011-03-14 20:35:08 -05:00

22 lines
545 B
Makefile

DIR= ${SYSCONFDIR}
CONF= rc.conf
CLEANFILES+= rc.conf
MK= ../mk
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} $^ > $@