aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sssd/0003-alpine.patch
blob: 043975d579bf60f83b209ac35bc4664aa1988525 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
--- sssd-1.15.3/src/external/platform.m4
+++ sssd-1.15.3-old/src/external/platform.m4
@@ -1,5 +1,5 @@
 AC_ARG_WITH([os],
-            [AC_HELP_STRING([--with-os=OS_TYPE], [Type of your operation system (fedora|redhat|suse|gentoo)])]
+            [AC_HELP_STRING([--with-os=OS_TYPE], [Type of your operation system (fedora|redhat|suse|gentoo|alpine)])]
            )
 osname=""
 if test x"$with_os" != x ; then
@@ -7,6 +7,7 @@
        test x"$with_os" = xredhat || \
        test x"$with_os" = xsuse || \
        test x"$with_os" = xgentoo || \
+       test x"$with_os" = xalpine || \
        test x"$with_os" = xdebian ; then
         osname=$with_os
     else
@@ -25,6 +26,8 @@
         osname="debian"
     elif test -f /etc/gentoo-release ; then
         osname="gentoo"
+    elif test -f /etc/alpine-release ; then
+        osname="alpine"
     fi
 
     AC_MSG_NOTICE([Detected operating system type: $osname])
@@ -35,6 +38,7 @@
 AM_CONDITIONAL([HAVE_SUSE], [test x"$osname" = xsuse])
 AM_CONDITIONAL([HAVE_DEBIAN], [test x"$osname" = xdebian])
 AM_CONDITIONAL([HAVE_GENTOO], [test x"$osname" = xgentoo])
+AM_CONDITIONAL([HAVE_ALPINE], [test x"$osname" = xalpine])
 
 AC_CHECK_MEMBERS([struct ucred.pid, struct ucred.uid, struct ucred.gid], , ,
                  [[#include <sys/socket.h>]])
--- sssd-1.15.3/Makefile.am
+++ sssd-1.15.3-old/Makefile.am
@@ -4423,12 +4419,16 @@
     init_SCRIPTS += \
         src/sysv/gentoo/sssd
 else
+if HAVE_ALPINE
     init_SCRIPTS += \
+	src/sysv/alpine/sssd
+else
+    init_SCRIPTS += \
         src/sysv/sssd
 endif
 endif
 endif
-
+endif
 
 dist_sssddata_DATA = \
     src/config/etc/sssd.api.conf \
--- sssd-1.15.3-old/configure.ac
+++ sssd-1.15.3/configure.ac
@@ -491,7 +491,7 @@
 
 AC_CONFIG_FILES([Makefile contrib/sssd.spec src/examples/rwtab src/doxy.config
                  contrib/sssd-pcsc.rules
-                 src/sysv/sssd src/sysv/gentoo/sssd src/sysv/SUSE/sssd
+                 src/sysv/sssd src/sysv/gentoo/sssd src/sysv/SUSE/sssd src/sysv/alpine/sssd
                  po/Makefile.in src/man/Makefile src/tests/cwrap/Makefile
                  src/tests/intg/Makefile
                  src/lib/ipa_hbac/ipa_hbac.pc src/lib/ipa_hbac/ipa_hbac.doxy
--- /dev/null
+++ sssd-1.15.3/src/sysv/alpine/sssd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+
+depend(){
+    need localmount netmount clock
+}
+
+start(){
+    ebegin "Starting sssd"
+    start-stop-daemon --start --exec ${exec_prefix}/usr/sbin/sssd -- -Df ${SSSD_OPTIONS}
+    eend ${?}
+}
+
+stop(){
+    ebegin "Stopping sssd"
+    start-stop-daemon --stop --pidfile ${prefix}/var/run/sssd.pid
+    eend ${?}
+}
--- /dev/null
+++ sssd-1.15.3/src/sysv/alpine/sssd.in
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+
+depend(){
+    need localmount netmount clock
+}
+
+start(){
+    ebegin "Starting sssd"
+    start-stop-daemon --start --exec ${exec_prefix}/usr/sbin/sssd -- -Df ${SSSD_OPTIONS}
+    eend ${?}
+}
+
+stop(){
+    ebegin "Stopping sssd"
+    start-stop-daemon --stop --pidfile ${prefix}/var/run/sssd.pid
+    eend ${?}
+}