Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 351712 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/rc/Makefile (-5 / +23 lines)
Lines 45-50 include ${MK}/${MKTERMCAP}.mk Link Here
45
LDADD+=		${LIBDL} ${LIBKVM}
45
LDADD+=		${LIBDL} ${LIBKVM}
46
include ${MK}/${MKPAM}.mk
46
include ${MK}/${MKPAM}.mk
47
47
48
# create symlinks to rc if not an SELINUX system, otherwise create a wrapper
49
# script to call rc with the proper name of the applet to execute.
50
# $1 is the name of the link
51
# $2 is the path+name of the target to link to (usually 'rc' or '/sbin/rc')
52
# $3 is the path where the link is created
53
define make-link
54
	if test -n "${MKSELINUX}"; then \
55
		printf '#!/bin/sh\nexec ${2} --applet %s "$$@"\n' ${1} >${3}/${1}; \
56
		chmod ${BINMODE} ${3}/${1}; \
57
	else \
58
		ln -sf ${2} ${3}/${1}; \
59
	fi;
60
endef
61
48
${SRCS}: version.h
62
${SRCS}: version.h
49
63
50
.PHONY:	version.h.tmp
64
.PHONY:	version.h.tmp
Lines 61-73 install: all Link Here
61
	${INSTALL} -d ${DESTDIR}${SBINDIR}
75
	${INSTALL} -d ${DESTDIR}${SBINDIR}
62
	${INSTALL} -m ${BINMODE} ${PROG} ${DESTDIR}${SBINDIR}
76
	${INSTALL} -m ${BINMODE} ${PROG} ${DESTDIR}${SBINDIR}
63
	${INSTALL} -d ${DESTDIR}${BINDIR}
77
	${INSTALL} -d ${DESTDIR}${BINDIR}
64
	for x in ${BINLINKS}; do ln -fs ${SBINDIR}/${PROG} ${DESTDIR}${BINDIR}/$$x; done
78
	$(foreach x,${BINLINKS}, \
79
		$(call make-link,${x},${SBINDIR}/${PROG},${DESTDIR}${BINDIR}))
65
	${INSTALL} -d ${DESTDIR}${SBINDIR}
80
	${INSTALL} -d ${DESTDIR}${SBINDIR}
66
	for x in ${SBINLINKS}; do ln -fs ${PROG} ${DESTDIR}${SBINDIR}/$$x; done
81
	$(foreach x,${SBINLINKS}, \
82
		$(call make-link,${x},${PROG},${DESTDIR}${SBINDIR}))
67
	${INSTALL} -d ${DESTDIR}${LINKDIR}/bin
83
	${INSTALL} -d ${DESTDIR}${LINKDIR}/bin
68
	for x in $(RC_BINLINKS); do ln -fs ${SBINDIR}/${PROG} ${DESTDIR}${LINKDIR}/bin/$$x; done
84
	$(foreach x,${RC_BINLINKS}, \
85
		$(call make-link,${x},${SBINDIR}/${PROG},${DESTDIR}${LINKDIR}/bin))
69
	${INSTALL} -d ${DESTDIR}${LINKDIR}/sbin
86
	${INSTALL} -d ${DESTDIR}${LINKDIR}/sbin
70
	for x in ${RC_SBINLINKS}; do ln -fs ${SBINDIR}/${PROG} ${DESTDIR}${LINKDIR}/sbin/$$x; done
87
	$(foreach x,${RC_SBINLINKS}, \
88
		$(call make-link,${x},${SBINDIR}/${PROG},${DESTDIR}${LINKDIR}/sbin))
71
	if test "${MKPAM}" = pam; then \
89
	if test "${MKPAM}" = pam; then \
72
		${INSTALL} -d ${DESTDIR}${PAMDIR}; \
90
		${INSTALL} -d ${DESTDIR}${PAMDIR}; \
73
		${INSTALL} -m ${PAMMODE} start-stop-daemon.pam ${DESTDIR}${PAMDIR}/start-stop-daemon; \
91
		${INSTALL} -m ${PAMMODE} start-stop-daemon.pam ${DESTDIR}${PAMDIR}/start-stop-daemon; \
Lines 76-79 install: all Link Here
76
check test::
94
check test::
77
95
78
links: rc
96
links: rc
79
	for l in ${ALL_LINKS}; do ln -sf rc $$l || exit $$? ; done
97
	$(foreach x,${ALL_LINKS},$(call make-link, ${x},rc,.))

Return to bug 351712