From: | "Justin Lecher (jlec)" <jlec@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-auth/nss-pam-ldapd/files: nslcd-init-r1 |
Date: | Mon, 26 May 2014 12:36:55 |
Message-Id: | 20140526123652.21EAD2004F@flycatcher.gentoo.org |
1 | jlec 14/05/26 12:36:52 |
2 | |
3 | Added: nslcd-init-r1 |
4 | Log: |
5 | sys-auth/nss-pam-ldapd: Move rundir to /run; minor style enhancements |
6 | |
7 | (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!) |
8 | |
9 | Revision Changes Path |
10 | 1.1 sys-auth/nss-pam-ldapd/files/nslcd-init-r1 |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/nss-pam-ldapd/files/nslcd-init-r1?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/nss-pam-ldapd/files/nslcd-init-r1?rev=1.1&content-type=text/plain |
14 | |
15 | Index: nslcd-init-r1 |
16 | =================================================================== |
17 | #!/sbin/runscript |
18 | # Copyright 1999-2014 Gentoo Foundation |
19 | # Distributed under the terms of the GNU General Public License v2 |
20 | # $Header: /var/cvsroot/gentoo-x86/sys-auth/nss-pam-ldapd/files/nslcd-init-r1,v 1.1 2014/05/26 12:36:51 jlec Exp $ |
21 | |
22 | extra_commands="checkconfig" |
23 | cfg="/etc/nslcd.conf" |
24 | |
25 | depend() { |
26 | need net |
27 | use dns logger |
28 | } |
29 | |
30 | checkconfig() { |
31 | if [ ! -f "$cfg" ] ; then |
32 | eerror "Please create $cfg" |
33 | eerror "Example config: /usr/share/nss-ldapd/nslcd.conf" |
34 | return 1 |
35 | fi |
36 | return 0 |
37 | } |
38 | |
39 | start() { |
40 | checkpath -q -d /run/nslcd -o nslcd:nslcd |
41 | checkconfig || return $? |
42 | |
43 | ebegin "Starting nslcd" |
44 | start-stop-daemon --start --pidfile /var/run/nslcd/nslcd.pid \ |
45 | --exec /usr/sbin/nslcd |
46 | eend $? "Failed to start nslcd" |
47 | } |
48 | |
49 | stop() { |
50 | ebegin "Stopping nslcd" |
51 | start-stop-daemon --stop --pidfile /var/run/nslcd/nslcd.pid |
52 | eend $? "Failed to stop nslcd" |
53 | } |