Thu, 04 Oct 2012 20:30:05 +0200
Correct out of date build configuration, porting to Solaris 11 network
link infrastructure and new libpcap logic. This additionally allows for
device drivers in subdirectories of /dev. Correct packaged nmap
personalities and signatures to work out of the box. Finally, hack
arpd logic to properly close sockets and quit on TERM by repeating
signaling in the run command script. Sadly, all this fails to correct
the run time behaviour of honeyd which fails to bind to the IP layer.
1 #!@l_prefix@/bin/openpkg rc
2 ##
3 ## rc.openldap -- Run-Commands
4 ##
6 %config
7 openldap_enable="$openpkg_rc_def"
8 openldap_flags=""
9 openldap_url="ldap://127.0.0.1:389/"
10 openldap_log_prolog="true"
11 openldap_log_epilog="true"
12 openldap_log_numfiles="10"
13 openldap_log_minsize="1M"
14 openldap_log_complevel="9"
16 %common
17 openldap_slapd_cfgfile="@l_prefix@/etc/openldap/slapd.conf"
18 openldap_slapd_pidfile="@l_prefix@/var/openldap/run/slapd.pid"
19 openldap_slapd_signal () {
20 [ -f $openldap_slapd_pidfile ] && kill -$1 `cat $openldap_slapd_pidfile`
21 }
23 %status -u @l_susr@ -o
24 openldap_usable="unknown"
25 openldap_active="no"
26 rcService openldap enable yes && \
27 openldap_slapd_signal 0 && openldap_active="yes"
28 echo "openldap_enable=\"$openldap_enable\""
29 echo "openldap_usable=\"$openldap_usable\""
30 echo "openldap_active=\"$openldap_active\""
32 %start -p 300 -u @l_susr@
33 rcService openldap enable yes || exit 0
34 openldap_slapd_signal 0
35 if [ $? -ne 0 ]; then
36 flags="$openldap_flags"
37 echo $flags | grep -- -h >/dev/null
38 if [ $? -ne 0 -a ".$openldap_url" != . ]; then
39 flags="$flags -h \"$openldap_url\""
40 fi
41 eval @l_prefix@/libexec/openldap/slapd $flags || exit $?
42 fi
44 %stop -p 700 -u @l_susr@
45 rcService openldap enable yes || exit 0
46 rcService openldap active no && exit 0
47 openldap_slapd_signal INT
48 sleep 2
50 %restart -u @l_susr@
51 rcService openldap enable yes || exit 0
52 rcService openldap active no && exit 0
53 rc openldap stop start
55 %daily -u @l_susr@
56 rcService openldap enable yes || exit 0
57 shtool rotate -f \
58 -n ${openldap_log_numfiles} -s ${openldap_log_minsize} -d \
59 -z ${openldap_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \
60 -P "${openldap_log_prolog}" \
61 -E "${openldap_log_epilog}; rc openldap restart" \
62 @l_prefix@/var/openldap/openldap.log