Skip to content

Commit

Permalink
Add gentoo distrubutions
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
  • Loading branch information
maksbotan authored and sgallagher committed Sep 2, 2010
1 parent 56d8d19 commit 0d7e647
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Makefile.am
Expand Up @@ -967,10 +967,15 @@ dist_init_SCRIPTS =
if HAVE_SUSE
dist_init_SCRIPTS += \
src/sysv/SUSE/sssd
else
if HAVE_GENTOO
dist_init_SCRIPTS += \
src/sysv/gentoo/sssd
else
dist_init_SCRIPTS += \
src/sysv/sssd
endif
endif


dist_sssdconf_DATA = \
Expand Down
6 changes: 5 additions & 1 deletion src/external/platform.m4
@@ -1,11 +1,12 @@
AC_ARG_WITH([os],
[AC_HELP_STRING([--with-os=OS_TYPE], [Type of your operation system (fedora|redhat|suse)])]
[AC_HELP_STRING([--with-os=OS_TYPE], [Type of your operation system (fedora|redhat|suse|gentoo)])]
)
osname=""
if test x"$with_os" != x ; then
if test x"$with_os" = xfedora || \
test x"$with_os" = xredhat || \
test x"$with_os" = xsuse || \
test x"$with_os" = xgentoo || \
test x"$with_os" = xdebian ; then
osname=$with_os
else
Expand All @@ -22,6 +23,8 @@ if test x"$osname" = x ; then
osname="suse"
elif test -f /etc/debian_version ; then
osname="debian"
elif test -f /etc/gentoo-release ; then
osname="gentoo"
fi

AC_MSG_NOTICE([Detected operating system type: $osname])
Expand All @@ -31,6 +34,7 @@ AM_CONDITIONAL([HAVE_FEDORA], [test x"$osname" = xfedora])
AM_CONDITIONAL([HAVE_REDHAT], [test x"$osname" = xredhat])
AM_CONDITIONAL([HAVE_SUSE], [test x"$osname" = xsuse])
AM_CONDITIONAL([HAVE_DEBIAN], [test x"$osname" = xdebian])
AM_CONDITIONAL([HAVE_GENTOO], [test x"$osname" = xgentoo])

AC_CHECK_MEMBERS([struct ucred.pid, struct ucred.uid, struct ucred.gid], , ,
[[#define _GNU_SOURCE
Expand Down
18 changes: 18 additions & 0 deletions src/sysv/gentoo/sssd
@@ -0,0 +1,18 @@
#!/sbin/runscript

depend(){
need localmount netmount clock
use syslog
}

start(){
ebegin "Starting sssd"
start-stop-daemon --start --exec /usr/sbin/sssd -- -D
eend ${?}
}

stop(){
ebegin "Stopping sssd"
start-stop-daemon --stop --pidfile /var/run/sssd.pid
eend ${?}
}

0 comments on commit 0d7e647

Please sign in to comment.