diff -Nur rc-scripts-0.3.1.orig/rc.d/init.d/functions rc-scripts-0.3.1/rc.d/init.d/functions
--- rc-scripts-0.3.1.orig/rc.d/init.d/functions 2002-01-13 04:40:42.000000000 +0100
+++ rc-scripts-0.3.1/rc.d/init.d/functions 2003-08-12 23:35:08.555241552 +0200
-@@ -238,13 +238,19 @@
+@@ -238,13 +238,18 @@
return $exit_code
}
daemon()
{
- typeset errors="" prog=""
-+ typeset errors="" prog="" limits_hard="" limits_soft=""
++ typeset errors="" prog="" limits=""
typeset -i exit_code=0
[ -z "$DEFAULT_SERVICE_RUN_NICE_LEVEL" ] && DEFAULT_SERVICE_RUN_NICE_LEVEL=0
- # Test syntax. Don't use -o instead || here - this will broke ksh --misiek
+ # "-c 0" to make sure it doesn't core dump anywhere; while this could mask
+ # problems with the daemon, it also closes some security problems.
+ # Users' limits are set via pam_limits.
-+ [ -z "$DEFAULT_SERVICE_LIMITS_HARD" ] && DEFAULT_SERVICE_LIMITS_HARD="-c 0"
-+ [ -z "$DEFAULT_SERVICE_LIMITS_SOFT" ] && DEFAULT_SERVICE_LIMITS_SOFT="-u unlimited -c 0"
++ [ -z "$DEFAULT_SERVICE_LIMITS" ] && DEFAULT_SERVICE_LIMITS_HARD="-u unlimited -c 0"
+ # Test syntax. Don't use -o instead || here - this will break ksh --misiek
while [ "$1" != "${1##-}" ] || [ "$1" != "${1##+}" ]; do
case $1 in
'') msg_usage " daemon [--user user] [+/-nicelevel] {program}"
-@@ -273,20 +279,26 @@
+@@ -273,20 +279,19 @@
prog="$prog $*"
fi
- # Limits are set via pam_limits.
if [ -n "$KSH_VERSION" ]; then
- ulimit -p unlimited
-+ limits_hard="`echo ${SERVICE_LIMITS_HARD:-$DEFAULT_SERVICE_LIMITS_HARD} | sed -e 's/-u/-p/'`"
-+ limits_soft="`echo ${SERVICE_LIMITS_SOFT:-$DEFAULT_SERVICE_LIMITS_SOFT} | sed -e 's/-u/-p/'`"
++ limits="`echo ${SERVICE_LIMITS:-$DEFAULT_SERVICE_LIMITS} | sed -e 's/-\([SH]\?\)u/-\1p/'`"
elif [ -n "$ZSH_VERSION" ]; then
- ulimit -u unlimited
-+ limits_hard="${SERVICE_LIMITS_HARD:-$DEFAULT_SERVICE_LIMITS_HARD}"
-+ limits_soft="${SERVICE_LIMITS_SOFT:-$DEFAULT_SERVICE_LIMITS_SOFT}"
++ limits="${SERVICE_LIMITS:-$DEFAULT_SERVICE_LIMITS}"
elif [ -n "$BASH_VERSION" ]; then
- ulimit -u unlimited
-+ limits_hard="${SERVICE_LIMITS_HARD:-$DEFAULT_SERVICE_LIMITS_HARD}"
-+ limits_soft="${SERVICE_LIMITS_SOFT:-$DEFAULT_SERVICE_LIMITS_SOFT}"
++ limits="${SERVICE_LIMITS:-$DEFAULT_SERVICE_LIMITS}"
# elif [ -n "`$SH -c 'echo ${.sh.version}' 2>/dev/null`" ]; then
fi
+ # soft limits first - it's impossible to set hard limit lower than existing soft
-+ while echo "$limits_soft" | grep -q '[^ ]'; do
-+ ulimit -S `echo ${limits_soft} | sed -e 's/^ *\(-[^-]*\)\(-.*\)\?$/\1/'`
-+ limits_soft="`echo ${limits_soft} | sed -e 's/^ *\(-[^-]*\)\(-.*\)\?$/\2/'`"
-+ done
-+ while echo "$limits_hard" | grep -q '[^ ]'; do
-+ ulimit -H `echo ${limits_hard} | sed -e 's/^ *\(-[^-]*\)\(-.*\)\?$/\1/'`
-+ limits_hard="`echo ${limits_hard} | sed -e 's/^ *\(-[^-]*\)\(-.*\)\?$/\2/'`"
++ while echo "$limits" | grep -q '[^ ]'; do
++ ulimit `echo ${limits} | sed -e 's/^ *\(-[^-]*\)\(-.*\)\?$/\1/'`
++ limits="`echo ${limits} | sed -e 's/^ *\(-[^-]*\)\(-.*\)\?$/\2/'`"
+ done
# And start it up.
diff -Nur rc-scripts-0.3.1.orig/sysconfig/system rc-scripts-0.3.1/sysconfig/system
--- rc-scripts-0.3.1.orig/sysconfig/system 2001-05-15 18:05:59.000000000 +0200
+++ rc-scripts-0.3.1/sysconfig/system 2003-08-12 23:32:38.022126064 +0200
-@@ -17,6 +17,18 @@
+@@ -17,6 +17,17 @@
# $SERVICE_RUN_NICE_LEVEL is not defined in /etc/sysconfig/<service>
DEFAULT_SERVICE_RUN_NICE_LEVEL=0
+# Default limits set before running demons (hard and soft) if
-+# $SERVICE_LIMITS_{HARD,SOFT} are not defined in /etc/sysconfig/<service>
++# $SERVICE_LIMITS are not defined in /etc/sysconfig/<service>
+# Use "-u" for process limits (automatically translated to "-p" for ksh).
++# Use "-Sx" or "-Hx" to set only soft or hard "x" limit.
+# Advised limits are:
+# "-u unlimited" to make sure daemons will be able to fork;
+# "-c 0" to make sure it doesn't core dump anywhere; while this could mask
+# problems with the daemon, it also closes some security problems;
+# users' limits are set via pam_limits.
-+# NOTE: soft limit MUST NOT exceed hard!
-+DEFAULT_SERVICE_LIMITS_HARD="-u unlimited -c 0"
-+DEFAULT_SERVICE_LIMITS_SOFT="-c 0"
++DEFAULT_SERVICE_LIMITS="-u unlimited -c 0"
+
# Run isapnp at system startup ?
RUN_ISAPNP=yes
-# $Id: rc-scripts.spec,v 1.120 2003-08-12 21:42:00 qboosh Exp $
+# $Id: rc-scripts.spec,v 1.121 2003-08-25 21:37:00 qboosh Exp $
Summary: inittab and /etc/rc.d scripts
Summary(de): inittab und /etc/rc.d Scripts
Summary(fr): inittab et scripts /etc/rc.d
Summary(tr): inittab ve /etc/rc.d dosyalarý
Name: rc-scripts
Version: 0.3.1
-Release: 14
+Release: 15
License: GPL
Vendor: PLD rc-scripts Team <pld-rc-scripts@pld-linux.org>
Group: Base
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Conflicts: LPRng < 3.8.0-2
Conflicts: psacct < 6.3.5-10
-Conflicts: openssh-server < 2:3.6.1p2-4
+Conflicts: openssh-server < 2:3.6.1p2-6
%define _prefix /usr
%define _exec_prefix /
%configure \
--with-localedir=%{localedir}
%{__make} \
- %{?_without_static:ppp_watch_LDADD="-lglib"}
+ %{?_without_static:ppp_watch_LDADD="-lglib" ppp_watch_DEPENDENCIES=}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/var/{run/netreport,log}
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
+ DESTDIR=$RPM_BUILD_ROOT \
+ %{?_without_static:ppp_watch_LDADD="-lglib" ppp_watch_DEPENDENCIES=}
for i in 0 1 2 3 4 5 6; do
install -d $RPM_BUILD_ROOT/etc/rc.d/rc$i.d