Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 723522
Collapse All | Expand All

(-)elogind-243.7.ebuild.orig (-6 / +12 lines)
Lines 19-25 Link Here
19
19
20
LICENSE="CC0-1.0 LGPL-2.1+ public-domain"
20
LICENSE="CC0-1.0 LGPL-2.1+ public-domain"
21
SLOT="0"
21
SLOT="0"
22
IUSE="+acl debug doc +pam +policykit selinux"
22
IUSE="+acl debug doc +pam +policykit runit selinux"
23
23
24
BDEPEND="
24
BDEPEND="
25
	app-text/docbook-xml-dtd:4.2
25
	app-text/docbook-xml-dtd:4.2
Lines 64-75 Link Here
64
}
64
}
65
65
66
src_configure() {
66
src_configure() {
67
	local rccgroupmode="$(grep rc_cgroup_mode ${EPREFIX}/etc/rc.conf | cut -d '"' -f 2)"
68
	local cgroupmode="legacy"
67
	local cgroupmode="legacy"
69
68
	if grep -q '^\S\+ /sys/fs/cgroup/unified cgroup2 ' /proc/mounts ; then
70
	if [[ "xhybrid" = "x${rccgroupmode}" ]] ; then
71
		cgroupmode="hybrid"
69
		cgroupmode="hybrid"
72
	elif [[ "xunified" = "x${rccgroupmode}" ]] ; then
70
	elif grep -q '^\S\+ /sys/fs/cgroup cgroup2 ' /proc/mounts ; then
73
		cgroupmode="unified"
71
		cgroupmode="unified"
74
	fi
72
	fi
75
73
Lines 85-91 Link Here
85
		-Dbashcompletiondir="${EPREFIX}/usr/share/bash-completion/completions"
83
		-Dbashcompletiondir="${EPREFIX}/usr/share/bash-completion/completions"
86
		-Dman=auto
84
		-Dman=auto
87
		-Dsmack=true
85
		-Dsmack=true
88
		-Dcgroup-controller=openrc
86
		$(use runit && echo -Dpoweroff-path=/sbin/elogind-poweroff)
87
		$(use runit && echo -Dreboot-path=/sbin/elogind-reboot)
88
		-Dcgroup-controller=$(usex runit none openrc)
89
		-Ddefault-hierarchy=${cgroupmode}
89
		-Ddefault-hierarchy=${cgroupmode}
90
		-Ddefault-kill-user-processes=false
90
		-Ddefault-kill-user-processes=false
91
		-Dacl=$(usex acl true false)
91
		-Dacl=$(usex acl true false)
Lines 108-113 Link Here
108
108
109
	sed -e "s/@libdir@/$(get_libdir)/" "${FILESDIR}"/${PN}.conf.in > ${PN}.conf || die
109
	sed -e "s/@libdir@/$(get_libdir)/" "${FILESDIR}"/${PN}.conf.in > ${PN}.conf || die
110
	newconfd ${PN}.conf ${PN}
110
	newconfd ${PN}.conf ${PN}
111
112
	if use runit; then
113
		exeinto /sbin
114
		printf '#!/bin/sh\nexec /sbin/runit-init 0\n' | newexe - elogind-poweroff
115
		printf '#!/bin/sh\nexec /sbin/runit-init 6\n' | newexe - elogind-reboot
116
	fi
111
}
117
}
112
118
113
pkg_postinst() {
119
pkg_postinst() {

Return to bug 723522