| 1 | # Copyright 1999-2008 Gentoo Foundation |
1 | # Copyright 1999-2008 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/Attic/hal-0.5.10.ebuild,v 1.17 2008/06/01 10:57:15 nixnut Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/Attic/hal-0.5.10.ebuild,v 1.18 2008/12/19 17:37:01 pva Exp $ |
| 4 | |
4 | |
| 5 | inherit eutils linux-info autotools flag-o-matic |
5 | inherit eutils linux-info autotools flag-o-matic |
| 6 | |
6 | |
| 7 | PATCH_VER="0" |
7 | PATCH_VER="0" |
| 8 | |
8 | |
| … | |
… | |
| 98 | |
98 | |
| 99 | # http://devmanual.gentoo.org/ebuild-writing/functions/ |
99 | # http://devmanual.gentoo.org/ebuild-writing/functions/ |
| 100 | # http://bugs.gentoo.org/show_bug.cgi?id=191605 |
100 | # http://bugs.gentoo.org/show_bug.cgi?id=191605 |
| 101 | |
101 | |
| 102 | # Create groups for hotplugging and HAL |
102 | # Create groups for hotplugging and HAL |
| 103 | enewgroup haldaemon || die "Problem adding haldaemon group" |
103 | enewgroup haldaemon |
| 104 | enewgroup plugdev || die "Problem adding plugdev group" |
104 | enewgroup plugdev |
| 105 | |
105 | |
| 106 | # HAL drops priviledges by default now ... |
106 | # HAL drops priviledges by default now ... |
| 107 | # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups) |
107 | # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups) |
| 108 | if use kernel_linux; then |
108 | if use kernel_linux; then |
| 109 | enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_LINUX} \ |
109 | enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_LINUX} |
| 110 | || die "Problem adding haldaemon user" |
|
|
| 111 | elif use kernel_FreeBSD; then |
110 | elif use kernel_FreeBSD; then |
| 112 | enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_FREEBSD} \ |
111 | enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_FREEBSD} |
| 113 | || die "Problem addding haldaemon user" |
|
|
| 114 | fi |
112 | fi |
| 115 | |
113 | |
| 116 | # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS} |
114 | # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS} |
| 117 | # If users have a problem with this, let them file a bug |
115 | # If users have a problem with this, let them file a bug |
| 118 | if [[ ${ROOT} == / ]] ; then |
116 | if [[ ${ROOT} == / ]] ; then |