summaryrefslogtreecommitdiffstats
diff options
'/>
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2006-07-16 15:10:03 +0200
committerWilly Tarreau <willy@wtap.(none)>2006-07-26 12:03:50 +0200
commite14de9c3071c179a3b8adc175f46fb152229a6a8 ( ('>patch)
tree5293b9e2a57a2eabe0ae02d08d2d9589a835194b
parent[RELEASE] init-scripts-0.3.30 (diff)
downloadinit-scripts-0.3.31.tar.gz
[RELEASE] init-scripts-0.3.31v0.3.31
-rw-r--r--ChangeLog4
-rwxr-xr-xsbin/init.d/echelogd11
-rwxr-xr-xsbin/init.d/firewall1
-rwxr-xr-xsbin/init.d/functions22
4 files changed, 21 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index a969e63..3b61d82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004/03/11 : 0.3.31
+- fixed a load error in the firewall script with forwarding disabled
+- fixed an infinite loop bug in recursive_rmmod()
+- added quick workaround for echelogd which does not close its FDs.
2004/02/01 : 0.3.30
- squid has been removed
- etc/init.d points to ../sbin/init.d
diff --git a/sbin/init.d/echelogd b/sbin/init.d/echelogd
index e4eada7..9ad6426 100755
--- a/sbin/init.d/echelogd
+++ b/sbin/init.d/echelogd
@@ -5,9 +5,14 @@
option bin reserved_option /opt/echelog/sbin/echelogd
option config standard_option /etc/echelog/echelog.conf
option runas standard_option echelogc:daemon
-option cmdline reserved_option '$bin -C $opt_config'
+option cmdline reserved_option 'echelogd_wrapper -C $opt_config'
#option check_interval reserved_option 60
+# start echelog daemon with input, output et error redirect to /dev/null
+function echelogd_wrapper {
+ eval "$bin ${cmdline#echelogd_wrapper}" < /dev/null >&0 2>&0
+}
+
# assign default values to options and variables before parsing the cfg file
function fct_pre_start {
local path=$( dirname $opt_config )
@@ -179,9 +184,5 @@ function do_install {
fi
}
-function do_check {
- echo "$HOSTNAME $1.$2 $(date +%s) RUNNING 0 OK"
-}
-
load_config
diff --git a/sbin/init.d/firewall b/sbin/init.d/firewall
index fdd81c6..47f5b47 100755
--- a/sbin/init.d/firewall
+++ b/sbin/init.d/firewall
@@ -184,6 +184,7 @@ function verbose_load {
echo "OK."
return 0
fi
+ return 0
fi
echo "FAILED."
return 1
diff --git a/sbin/init.d/functions b/sbin/init.d/functions
index cc4058e..4d1be02 100755
--- a/sbin/init.d/functions
+++ b/sbin/init.d/functions
@@ -1,7 +1,7 @@
#!/bin/bash
#
-# sbin/init.d/functions - Formilux init script - version 0.3.24 - 2003-10-02
+# sbin/init.d/functions - Formilux init script - version 0.3.31 - 2004-03-11
#
# Copyright (C) 2001-2003 Benoit Dolez & Willy Tarreau
# mailto: benoit@ant-computing.com,willy@ant-computing.com
@@ -215,18 +215,10 @@ function recursive_rmmod {
local mod
while : ; do
- args=( $(/sbin/lsmod|grep "^$1 "|tr -d '\[\]') )
+ args=( $(/sbin/lsmod|tail +2|sed "s/([^)]*)//g"|grep "^$1 "|tr -d '\[\]') )
[ ${#args[@]} -gt 0 ] || return 0
- if [ "${args[2]}" = "0" ]; then
- rmmod $1
- return $?
- elif [ -z "${args[3]}" ]; then
- # use count >0, but nothing to unload
- return 1
- elif [ "${args[3]}" = "(autoclean)" ]; then
- # use count >0, but nothing to unload
- return 1
- else
+ if [ -n "${args[3]}" ]; then
+ # there are modules to unload first
mod=3
while [ $mod -lt ${#args[@]} ]; do
if ! recursive_rmmod ${args[$mod]}; then
@@ -235,6 +227,12 @@ function recursive_rmmod {
fi
(( mod++ ))
done
+ elif [ "${args[2]}" = "0" ]; then
+ rmmod $1
+ return $?
+ else
+ # impossible to remove this module (count>0)
+ return 1
fi
done
}