head 1.18; access; symbols OPENPKG_E1_MP_HEAD:1.18 OPENPKG_E1_MP:1.18 OPENPKG_E1_MP_2_STABLE:1.17.10.1 OPENPKG_E1_FP:1.17.10.1 OPENPKG_2_STABLE_MP:1.18 OPENPKG_2_STABLE_20061018:1.17.10.1 OPENPKG_2_STABLE_20060622:1.17 OPENPKG_2_STABLE:1.17.0.10 OPENPKG_2_STABLE_BP:1.17 OPENPKG_2_5_RELEASE:1.17 OPENPKG_2_5_SOLID:1.17.0.8 OPENPKG_2_5_SOLID_BP:1.17 OPENPKG_2_4_RELEASE:1.17 OPENPKG_2_4_SOLID:1.17.0.6 OPENPKG_2_4_SOLID_BP:1.17 OPENPKG_CW_FP:1.17 OPENPKG_2_3_RELEASE:1.17 OPENPKG_2_3_SOLID:1.17.0.4 OPENPKG_2_3_SOLID_BP:1.17 OPENPKG_2_2_RELEASE:1.17 OPENPKG_2_2_SOLID:1.17.0.2 OPENPKG_2_2_SOLID_BP:1.17 OPENPKG_2_1_RELEASE:1.15 OPENPKG_2_1_SOLID:1.15.0.4 OPENPKG_2_1_SOLID_BP:1.15 OPENPKG_2_0_RELEASE:1.15 OPENPKG_2_0_SOLID:1.15.0.2 OPENPKG_2_0_SOLID_BP:1.15 OPENPKG_1_3_RELEASE:1.1.2.1 OPENPKG_1_3_SOLID:1.1.2.1.0.2 OPENPKG_1_3_SOLID_BP:1.1.2.1 OPENPKG_1_STABLE_MP:1.14 OPENPKG_1_2_RELEASE:1.1 OPENPKG_1_2_SOLID:1.1.0.4 OPENPKG_1_2_SOLID_BP:1.1 OPENPKG_1_STABLE:1.1.0.2 OPENPKG_1_STABLE_BP:1.1; locks; strict; comment @# @; 1.18 date 2006.08.25.19.18.21; author rse; state Exp; branches; next 1.17; commitid Tvsj1UyQ8rQ89gKr; 1.17 date 2004.09.20.14.33.30; author rse; state Exp; branches 1.17.10.1; next 1.16; 1.16 date 2004.07.06.11.18.21; author ms; state Exp; branches; next 1.15; 1.15 date 2003.09.03.15.58.35; author ms; state Exp; branches; next 1.14; 1.14 date 2003.07.23.12.25.25; author mlelstv; state Exp; branches; next 1.13; 1.13 date 2003.07.22.08.10.59; author rse; state Exp; branches; next 1.12; 1.12 date 2003.07.21.08.40.40; author thl; state Exp; branches; next 1.11; 1.11 date 2003.07.19.17.06.16; author rse; state Exp; branches; next 1.10; 1.10 date 2003.07.17.21.34.58; author thl; state Exp; branches; next 1.9; 1.9 date 2003.07.10.07.50.52; author rse; state Exp; branches; next 1.8; 1.8 date 2003.07.09.07.32.27; author rse; state Exp; branches; next 1.7; 1.7 date 2003.07.07.21.54.27; author thl; state Exp; branches; next 1.6; 1.6 date 2003.06.28.14.34.01; author rse; state Exp; branches; next 1.5; 1.5 date 2003.06.28.14.09.17; author rse; state Exp; branches; next 1.4; 1.4 date 2003.06.24.13.27.52; author thl; state Exp; branches; next 1.3; 1.3 date 2003.06.24.12.17.37; author thl; state Exp; branches; next 1.2; 1.2 date 2003.06.24.12.07.59; author thl; state Exp; branches; next 1.1; 1.1 date 2002.09.07.20.35.31; author rse; state Exp; branches 1.1.2.1; next ; 1.17.10.1 date 2006.10.16.14.54.53; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; 1.1.2.1 date 2003.07.24.20.50.24; author rse; state Exp; branches; next ; desc @@ 1.18 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.portfwd -- Run-Commands ## %config portfwd_enable="$openpkg_rc_def" portfwd_flags="" portfwd_log_prolog="true" portfwd_log_epilog="true" portfwd_log_numfiles="10" portfwd_log_minsize="1M" portfwd_log_complevel="9" %common portfwd_pidfile="@@l_prefix@@/var/portfwd/portfwd.pid" portfwd_signal () { [ -f $portfwd_pidfile ] && kill -$1 `cat $portfwd_pidfile` } %status -u @@l_susr@@ -o portfwd_usable="unknown" portfwd_active="no" rcService portfwd enable yes && \ portfwd_signal 0 && portfwd_active="yes" echo "portfwd_enable=\"$portfwd_enable\"" echo "portfwd_usable=\"$portfwd_usable\"" echo "portfwd_active=\"$portfwd_active\"" %start -u @@l_susr@@ rcService portfwd enable yes || exit 0 rcService portfwd active yes && exit 0 @@l_prefix@@/sbin/portfwd -p $portfwd_pidfile $portfwd_flags %stop -u @@l_susr@@ rcService portfwd enable yes || exit 0 rcService portfwd active no && exit 0 portfwd_signal TERM %restart -u @@l_susr@@ rcService portfwd enable yes || exit 0 rcService portfwd active no && exit 0 rc portfwd stop sleep 2 rc portfwd start %daily -u @@l_susr@@ rcService portfwd enable yes || exit 0 shtool rotate -f \ -n ${portfwd_log_numfiles} -s ${portfwd_log_minsize} -d \ -z ${portfwd_log_complevel} -o @@l_susr@@ -g @@l_mgrp@@ -m 644 \ -P "${portfwd_log_prolog}" \ -E "${portfwd_log_epilog}; rc portfwd restart" \ @@l_prefix@@/var/portfwd/portfwd.log @ 1.17 log @remove lonely logfile rotation comment in rc files @ text @d1 1 a1 1 #!@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc @ 1.17.10.1 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @d1 1 a1 1 #!@@l_prefix@@/bin/openpkg rc @ 1.16 log @in rc.*:%daily, restart daemons per default in shtool epilog should a logfile rotation be performed @ text @a48 2 # rotate logfile @ 1.15 log @Fix logfile rotation, and implement features in ticket #202 @ text @d55 1 a55 1 -E "${portfwd_log_epilog} && rc portfwd restart" \ @ 1.14 log @%status and pidfile handling @ text @d32 1 d37 1 d42 1 d49 2 d53 1 a53 1 -z ${portfwd_log_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 644 \ d55 1 a55 1 -E "${portfwd_log_epilog}" \ @ 1.13 log @cleanup the priority: move 200 to 500 and because 500 is default just ommit it; fix DNS/NTP/etc. dependencies @ text @d15 15 d32 1 a32 1 @@l_prefix@@/sbin/portfwd $portfwd_flags d36 7 a42 1 rpmtool signal -d 1 -m @@l_prefix@@/sbin/portfwd TERM KILL >/dev/null 2>&1 || true @ 1.12 log @PR#210: shtool options space before argument @ text @d15 1 a15 1 %start -p 100 -u @@l_susr@@ d19 1 a19 1 %stop -p 200 -u @@l_susr@@ @ 1.11 log @replace opXXXX with rcXXXX (PR#207) @ text @d26 2 a27 2 -n${portfwd_log_numfiles} -s${portfwd_log_minsize} -d \ -z${portfwd_log_complevel} -o@@l_rusr@@ -g@@l_rgrp@@ -m644 \ @ 1.10 log @migrate opServiceEnabled to opService ... enable yes; use new bootstrap feature and apply opService short circuit to %env @ text @d16 1 a16 1 opService portfwd enable yes || exit 0 d20 1 a20 1 opService portfwd enable yes || exit 0 d24 1 a24 1 opService portfwd enable yes || exit 0 @ 1.9 log @use new openpkg_rc_def variable in run-command scripts for allowing the admin to change the global default for xxx_enable @ text @d16 1 a16 1 opServiceEnabled portfwd || exit 0 d20 1 a20 1 opServiceEnabled portfwd || exit 0 d24 1 a24 1 opServiceEnabled portfwd || exit 0 @ 1.8 log @style cleanups; bugfix rc substitution @ text @d7 1 a7 1 portfwd_enable="yes" @ 1.7 log @rclint police: fix mandatory/wished trailing blank line missing @ text @d16 2 a17 3 if opServiceEnabled portfwd; then @@l_prefix@@/sbin/portfwd $portfwd_flags fi d20 2 a21 3 if opServiceEnabled portfwd; then rpmtool signal -d 1 -m @@l_prefix@@/sbin/portfwd TERM KILL >/dev/null 2>&1 || true fi @ 1.6 log @do not document something obvious if other similar things are not documented the same way @ text @d33 1 @ 1.5 log @fix introduced logfile path @ text @a26 2 # rotate logfile @ 1.4 log @add/unify log file trimming @ text @d34 1 a34 1 @@l_prefix@@/var/portfwd/log/portfwd.log @ 1.3 log @replace root constant with l_susr variable in rc files @ text @d9 5 d25 10 @ 1.2 log @cosmetics: align/fix/unify rc header comment @ text @d10 1 a10 1 %start -p 100 -u root d15 1 a15 1 %stop -p 200 -u root @ 1.1 log @new package: portfwd 0.26rc2 (TCP/UDP Port Forwarding Daemon) @ text @d3 1 a3 1 ## rc.portfwd -- Run-Commands for portfwd daemon @ 1.1.2.1 log @mass Merge-From-CURRENT (MFC) in preparation for OpenPKG 1.3 [class PLUS only] @ text @d3 1 a3 1 ## rc.portfwd -- Run-Commands d7 1 a7 1 portfwd_enable="$openpkg_rc_def" a8 5 portfwd_log_prolog="true" portfwd_log_epilog="true" portfwd_log_numfiles="10" portfwd_log_minsize="1M" portfwd_log_complevel="9" d10 9 a18 37 %common portfwd_pidfile="@@l_prefix@@/var/portfwd/portfwd.pid" portfwd_signal () { [ -f $portfwd_pidfile ] && kill -$1 `cat $portfwd_pidfile` } %status -u @@l_susr@@ -o portfwd_usable="unknown" portfwd_active="no" rcService portfwd enable yes && \ portfwd_signal 0 && portfwd_active="yes" echo "portfwd_enable=\"$portfwd_enable\"" echo "portfwd_usable=\"$portfwd_usable\"" echo "portfwd_active=\"$portfwd_active\"" %start -u @@l_susr@@ rcService portfwd enable yes || exit 0 @@l_prefix@@/sbin/portfwd -p $portfwd_pidfile $portfwd_flags %stop -u @@l_susr@@ rcService portfwd enable yes || exit 0 portfwd_signal TERM %restart -u @@l_susr@@ rcService portfwd enable yes || exit 0 rc portfwd stop sleep 2 rc portfwd start %daily -u @@l_susr@@ rcService portfwd enable yes || exit 0 shtool rotate -f \ -n ${portfwd_log_numfiles} -s ${portfwd_log_minsize} -d \ -z ${portfwd_log_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 644 \ -P "${portfwd_log_prolog}" \ -E "${portfwd_log_epilog}" \ @@l_prefix@@/var/portfwd/portfwd.log @