head	1.20;
access;
symbols
	OPENPKG_E1_MP_HEAD:1.20
	OPENPKG_E1_MP:1.20
	OPENPKG_E1_MP_2_STABLE:1.20.2.2
	OPENPKG_E1_FP:1.20.2.2
	OPENPKG_2_STABLE_MP:1.20
	OPENPKG_2_STABLE_20061018:1.20.2.2
	OPENPKG_2_STABLE:1.20.0.2
	OPENPKG_CW_FP:1.18
	OPENPKG_1_STABLE_MP:1.14;
locks; strict;
comment	@# @;


1.20
date	2006.08.25.19.16.48;	author rse;	state Exp;
branches
	1.20.2.1;
next	1.19;
commitid	Tvsj1UyQ8rQ89gKr;

1.19
date	2005.07.29.15.41.10;	author rse;	state Exp;
branches;
next	1.18;

1.18
date	2004.09.20.14.33.25;	author rse;	state Exp;
branches;
next	1.17;

1.17
date	2004.07.06.11.18.11;	author ms;	state Exp;
branches;
next	1.16;

1.16
date	2003.09.25.21.41.44;	author ms;	state Exp;
branches;
next	1.15;

1.15
date	2003.09.24.22.37.23;	author ms;	state Exp;
branches;
next	1.14;

1.14
date	2003.07.22.08.10.47;	author rse;	state Exp;
branches;
next	1.13;

1.13
date	2003.07.21.08.12.34;	author thl;	state Exp;
branches;
next	1.12;

1.12
date	2003.07.19.17.05.57;	author rse;	state Exp;
branches;
next	1.11;

1.11
date	2003.07.17.21.34.42;	author thl;	state Exp;
branches;
next	1.10;

1.10
date	2003.07.10.07.50.30;	author rse;	state Exp;
branches;
next	1.9;

1.9
date	2003.07.07.21.54.22;	author thl;	state Exp;
branches;
next	1.8;

1.8
date	2003.06.28.14.26.00;	author rse;	state Exp;
branches;
next	1.7;

1.7
date	2003.06.28.13.58.26;	author rse;	state Exp;
branches;
next	1.6;

1.6
date	2003.06.24.16.04.30;	author mlelstv;	state Exp;
branches;
next	1.5;

1.5
date	2003.06.24.13.26.45;	author thl;	state Exp;
branches;
next	1.4;

1.4
date	2003.06.24.12.07.46;	author thl;	state Exp;
branches;
next	1.3;

1.3
date	2003.02.21.11.48.07;	author rse;	state Exp;
branches;
next	1.2;

1.2
date	2003.02.21.10.44.42;	author ps;	state Exp;
branches;
next	1.1;

1.1
date	2003.02.20.14.50.42;	author ps;	state Exp;
branches;
next	;

1.20.2.1
date	2006.08.25.19.16.48;	author rse;	state dead;
branches;
next	1.20.2.2;
commitid	iZxwRSmmWscPXUQr;

1.20.2.2
date	2006.10.16.14.51.01;	author rse;	state Exp;
branches;
next	;
commitid	iZxwRSmmWscPXUQr;


desc
@@


1.20
log
@replace '@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc' in shebang with '@@l_prefix@@/bin/openpkg rc' to allow people who run the rc.xxx scripts directly (as executables) to leverage from the Set-UID functionality
@
text
@#!@@l_prefix@@/bin/openpkg rc
##
##  rc.honeyd -- Run-Commands
##

%config
    honeyd_enable="$openpkg_rc_def"
    honeyd_log_prolog="true"
    honeyd_log_epilog="true"
    honeyd_log_numfiles="10"
    honeyd_log_minsize="1M"
    honeyd_log_complevel="9"
    honeyd_ip_network="192.168.100.0/24"
    honeyd_if=""

%common
    honeyd_pidfile="@@l_prefix@@/var/honeyd/honeyd.pid"
    honeyd_cfgfile="@@l_prefix@@/etc/honeyd/honeyd.conf"
    honeyd_prnfile="@@l_prefix@@/share/honeyd/nmap.prints"
    honeyd_xpbfile="@@l_prefix@@/share/honeyd/xprobe2.conf"
    honeyd_assfile="@@l_prefix@@/share/honeyd/nmap.assoc"
    honeyd_signal () {
        [ -f $honeyd_pidfile ] && kill -$1 `cat $honeyd_pidfile`
    }

%status -u @@l_susr@@ -o
    honeyd_usable="no"
    honeyd_active="no"
    rcService honeyd enable yes && \
        honeyd_chroot && honeyd_usable="yes"
    rcService honeyd enable yes && \
        honeyd_signal 0 && honeyd_active="yes"
    echo "honeyd_enable=\"$honeyd_enable\""
    echo "honeyd_usable=\"$honeyd_usable\""
    echo "honeyd_active=\"$honeyd_active\""

%start -u @@l_susr@@
    rcService honeyd enable yes || exit 0
    rcService honeyd active yes && exit 0
    if [ ".$honeyd_if" != . ]; then
        arpd_interface="-i $honeyd_if"
    fi
    @@l_prefix@@/bin/honeyd \
        -p $honeyd_prnfile \
        -x $honeyd_xpbfile \
        -a $honeyd_assfile \
        -f $honeyd_cfgfile \
        $honeyd_interface \
        $honeyd_ip_network \
        >/dev/null 2>&1

%stop -u @@l_susr@@
    rcService honeyd enable yes || exit 0
    rcService honeyd active no && exit 0
    honeyd_signal TERM

%restart -u @@l_susr@@
    rcService honeyd enable yes || exit 0
    rcService honeyd active no && exit 0
    rc honeyd stop
    sleep 2
    rc honeyd start

%reload -u @@l_susr@@
    rcService honeyd enable yes || exit 0
    rcService honeyd active no && exit 0
    honeyd_signal HUP

%daily -u @@l_susr@@
    rcService honeyd enable yes || exit 0
    shtool rotate -f \
        -n ${honeyd_log_numfiles} -s ${honeyd_log_minsize} -d \
        -z ${honeyd_log_complevel} -o @@l_susr@@ -g @@l_mgrp@@ -m 644 \
        -P "${honeyd_log_prolog}" \
        -E "${honeyd_log_epilog}; rc honeyd restart" \
        @@l_prefix@@/var/honeyd/honeyd.log

@


1.20.2.1
log
@file rc.honeyd was added on branch OPENPKG_2_STABLE on 2006-10-16 14:51:01 +0000
@
text
@d1 77
@


1.20.2.2
log
@Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class)
@
text
@a0 77
#!@@l_prefix@@/bin/openpkg rc
##
##  rc.honeyd -- Run-Commands
##

%config
    honeyd_enable="$openpkg_rc_def"
    honeyd_log_prolog="true"
    honeyd_log_epilog="true"
    honeyd_log_numfiles="10"
    honeyd_log_minsize="1M"
    honeyd_log_complevel="9"
    honeyd_ip_network="192.168.100.0/24"
    honeyd_if=""

%common
    honeyd_pidfile="@@l_prefix@@/var/honeyd/honeyd.pid"
    honeyd_cfgfile="@@l_prefix@@/etc/honeyd/honeyd.conf"
    honeyd_prnfile="@@l_prefix@@/share/honeyd/nmap.prints"
    honeyd_xpbfile="@@l_prefix@@/share/honeyd/xprobe2.conf"
    honeyd_assfile="@@l_prefix@@/share/honeyd/nmap.assoc"
    honeyd_signal () {
        [ -f $honeyd_pidfile ] && kill -$1 `cat $honeyd_pidfile`
    }

%status -u @@l_susr@@ -o
    honeyd_usable="no"
    honeyd_active="no"
    rcService honeyd enable yes && \
        honeyd_chroot && honeyd_usable="yes"
    rcService honeyd enable yes && \
        honeyd_signal 0 && honeyd_active="yes"
    echo "honeyd_enable=\"$honeyd_enable\""
    echo "honeyd_usable=\"$honeyd_usable\""
    echo "honeyd_active=\"$honeyd_active\""

%start -u @@l_susr@@
    rcService honeyd enable yes || exit 0
    rcService honeyd active yes && exit 0
    if [ ".$honeyd_if" != . ]; then
        arpd_interface="-i $honeyd_if"
    fi
    @@l_prefix@@/bin/honeyd \
        -p $honeyd_prnfile \
        -x $honeyd_xpbfile \
        -a $honeyd_assfile \
        -f $honeyd_cfgfile \
        $honeyd_interface \
        $honeyd_ip_network \
        >/dev/null 2>&1

%stop -u @@l_susr@@
    rcService honeyd enable yes || exit 0
    rcService honeyd active no && exit 0
    honeyd_signal TERM

%restart -u @@l_susr@@
    rcService honeyd enable yes || exit 0
    rcService honeyd active no && exit 0
    rc honeyd stop
    sleep 2
    rc honeyd start

%reload -u @@l_susr@@
    rcService honeyd enable yes || exit 0
    rcService honeyd active no && exit 0
    honeyd_signal HUP

%daily -u @@l_susr@@
    rcService honeyd enable yes || exit 0
    shtool rotate -f \
        -n ${honeyd_log_numfiles} -s ${honeyd_log_minsize} -d \
        -z ${honeyd_log_complevel} -o @@l_susr@@ -g @@l_mgrp@@ -m 644 \
        -P "${honeyd_log_prolog}" \
        -E "${honeyd_log_epilog}; rc honeyd restart" \
        @@l_prefix@@/var/honeyd/honeyd.log

@


1.19
log
@consistently name interface variables xxx_if and display a hint on initial installation that those packages need this variable to be set before it can be started (although usually all OpenPKG daemon packages can be started without any configurations)
@
text
@d1 1
a1 1
#!@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc
@


1.18
log
@remove lonely logfile rotation comment in rc files
@
text
@d14 1
a14 1
    honeyd_hw_iface=""
d40 2
a41 2
    if [ ".$honeyd_hw_iface" != . ]; then
        arpd_interface="-i $honeyd_hw_iface"
@


1.17
log
@in rc.*:%daily, restart daemons per default in shtool epilog should a logfile rotation be performed
@
text
@a70 2

    #   rotate logfile
@


1.16
log
@Fix broken configure script, reorganize patch, remove redundant AF_LOCAL substitution, add with_gui option, write honey launch script, add postscript documentation, correct FSL linkage, minimize installation logic, add FTP, POP3, and SMTP service decoys, add Linux, AIX, and Windows host definitions, add missing uids and gids to host definitions, remove log files, use 192.168.1/24 as the default network, improve run command start logic, correct log file rotation, correct setenv(3) replacement method, and reorder dependencies
@
text
@d77 1
a77 1
        -E "${honeyd_log_epilog} && rc honeyd restart" \
@


1.15
log
@I give up, sometimes arpd+honeyd works and sometimes not, but finish this package off anyways, adding features from ticket #202, a big patch job for portable builds, and a better default configuration
@
text
@d13 2
a14 1
    honeyd_ip_network="127.0.0.0/24"
d20 2
d40 11
a50 2
    cd @@l_prefix@@/share/honeyd
    @@l_prefix@@/sbin/honeyd -f $honeyd_cfgfile -p $honeyd_prnfile $honeyd_ip_network >/dev/null 2>&1
d75 1
a75 1
        -z ${honeyd_log_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 644 \
@


1.14
log
@cleanup the priority: move 200 to 500 and because 500 is default just ommit it; fix DNS/NTP/etc. dependencies
@
text
@d13 20
d36 1
d38 1
a38 3
    @@l_prefix@@/sbin/honeyd \
        -f @@l_prefix@@/etc/honeyd/honeyd.conf \
        >/dev/null 2>&1
d42 2
a43 3
    if [ -f @@l_prefix@@/var/honeyd/honeyd.pid ]; then
        kill -TERM `cat @@l_prefix@@/var/honeyd/honeyd.pid`
    fi
d47 4
a50 7
    if [ -f @@l_prefix@@/var/honeyd/honeyd.pid ]; then
        kill -TERM `cat @@l_prefix@@/var/honeyd/honeyd.pid`
        sleep 2
    fi
    @@l_prefix@@/sbin/honeyd \
        -f @@l_prefix@@/etc/honeyd/honeyd.conf \
        >/dev/null 2>&1
d54 2
a55 3
    if [ -f @@l_prefix@@/var/honeyd/honeyd.pid ]; then
        kill -HUP `cat @@l_prefix@@/var/honeyd/honeyd.pid`
    fi
d65 1
a65 1
        -E "${honeyd_log_epilog}" \
@


1.13
log
@PR#210: shtool options space before argument
@
text
@d14 1
a14 1
%start -p 200 -u @@l_susr@@
d21 1
a21 1
%stop -p 200 -u @@l_susr@@
@


1.12
log
@replace opXXXX with rcXXXX (PR#207)
@
text
@d48 2
a49 2
        -n${honeyd_log_numfiles} -s${honeyd_log_minsize} -d \
        -z${honeyd_log_complevel} -o@@l_rusr@@ -g@@l_rgrp@@ -m644 \
@


1.11
log
@migrate opServiceEnabled to opService ... enable yes; use new bootstrap feature and apply opService short circuit to %env
@
text
@d15 1
a15 1
    opService honeyd enable yes || exit 0
d22 1
a22 1
    opService honeyd enable yes || exit 0
d28 1
a28 1
    opService honeyd enable yes || exit 0
d38 1
a38 1
    opService honeyd enable yes || exit 0
d44 1
a44 1
    opService honeyd enable yes || exit 0
@


1.10
log
@use new openpkg_rc_def variable in run-command scripts for allowing the admin to change the global default for xxx_enable
@
text
@d15 1
a15 1
    opServiceEnabled honeyd || exit 0
d22 1
a22 1
    opServiceEnabled honeyd || exit 0
d28 1
a28 1
    opServiceEnabled honeyd || exit 0
d38 1
a38 1
    opServiceEnabled honeyd || exit 0
d44 1
a44 1
    opServiceEnabled honeyd || exit 0
@


1.9
log
@rclint police: fix mandatory/wished trailing blank line missing
@
text
@d7 1
a7 1
    honeyd_enable="yes"
@


1.8
log
@needs superuser rights to set restrictive user logfile ownership
@
text
@d53 1
@


1.7
log
@fix introduced logfile path
@
text
@d43 1
a43 1
%daily -u @@l_rusr@@
@


1.6
log
@fix rc script
@
text
@d52 1
a52 1
        @@l_prefix@@/var/honeyd/log/honeyd.log
@


1.5
log
@add/unify log file trimming
@
text
@d43 1
a43 1
%daily -u @@l_susr@@
@


1.4
log
@cosmetics: align/fix/unify rc header comment
@
text
@d8 5
d43 10
@


1.3
log
@- add OSSP fsl support to get rid of syslog'ing
- replace silly shipped scripts/* with another silly honeyd.service
  but at least this way do not package crap code
- fix PID file writing
- cleanup installation procedure
- install libhoneyd.so
@
text
@d3 1
a3 1
##  rc.honeyd -- Run-Commands for honeyd
@


1.2
log
@Appending an updated version of honey package
@
text
@d11 4
a14 2
    cd @@l_prefix@@/share/honeyd/base/
    @@l_prefix@@/sbin/honeyd -f @@l_prefix@@/etc/honeyd/honeyd.conf -p @@l_prefix@@/share/honeyd/nmap.prints -x  @@l_prefix@@/share/honeyd/xprobe2.conf -a @@l_prefix@@/share/honeyd/nmap.assoc >/dev/null 2>&1
d28 3
a30 1
    @@l_prefix@@/sbin/honeyd -F @@l_prefix@@/etc/honeyd/honeyd.conf >/dev/null 2>&1
@


1.1
log
@Appending standard configuration file and rc file.
Removing sudo usage.
@
text
@d11 2
a12 2
    @@l_prefix@@/sbin/honeyd -f @@l_prefix@@/etc/honeyd/honeyd.conf -p @@l_prefix@@/share/honeyd/nmap.prints -x  @@l_prefix@@/share/honeyd/xprobe2.conf -a
@@l_prefix@@/share/honeyd/nmap.assoc >/dev/null 2>&1
d15 1
a15 1
    opServiceEnabled honey || exit 0
d29 1
a29 1
    opServiceEnabled amd || exit 0
@

