--- /dev/null
+diff -Nur rc-scripts-0.3.1.orig/rc.d/rc.shutdown rc-scripts-0.3.1/rc.d/rc.shutdown
+--- rc-scripts-0.3.1.orig/rc.d/rc.shutdown 2002-01-27 03:13:29.000000000 +0100
++++ rc-scripts-0.3.1/rc.d/rc.shutdown 2003-08-12 22:10:22.520436368 +0200
+@@ -29,8 +29,9 @@
+ halt -w
+
+ # Turn off swap, then unmount file systems.
+-run_cmd "Turning off swap and accounting" swapoff -a
+-[ -x /sbin/accton ] && LC_ALL=C /sbin/accton 2>&1 | grep -v "not implemented"
++run_cmd "Turning off swap" swapoff -a
++
++[ -x /etc/rc.d/rc.acct ] && /etc/rc.d/rc.acct stop
+
+ if [ -x /sbin/quotaoff ]; then
+ run_cmd "Turning off quotas for local filesystems" /sbin/quotaoff -a
+diff -Nur rc-scripts-0.3.1.orig/rc.d/rc.sysinit rc-scripts-0.3.1/rc.d/rc.sysinit
+--- rc-scripts-0.3.1.orig/rc.d/rc.sysinit 2003-08-12 22:06:07.000000000 +0200
++++ rc-scripts-0.3.1/rc.d/rc.sysinit 2003-08-12 22:08:49.104637728 +0200
+@@ -550,8 +550,8 @@
+ fi
+
+ # Turn on process accounting
+-if [ -x /sbin/accton ] ; then
+- run_cmd "Turning on process accounting" /sbin/accton /var/log/pacct
++if [ -x /etc/rc.d/rc.acct ] ; then
++ /etc.rc.d/rc.acct start
+ fi
+
+ # Set the clock if timezone definition wasn't available (eg. /usr not mounted)
+++ /dev/null
---- rc-scripts-0.2.10/src/Makefile.am~ Mon Apr 3 16:49:40 2000
-+++ rc-scripts-0.2.10/src/Makefile.am Wed Dec 27 03:32:07 2000
-@@ -47,7 +47,7 @@
- getkey_SOURCES = getkey.c
-
- ppp_watch_SOURCES = ppp-watch.c shvar.c shvar.h
--ppp_watch_LDADD = /usr/lib/libglib.a
-+ppp_watch_LDADD = -lglib
- INCLUDES = `glib-config --cflags`
-
- consoletype_SOURCES = consoletype.c
+++ /dev/null
---- rc-scripts-0.3.1/rc.d/init.d/functions.orig Sun Jan 13 04:40:42 2002
-+++ rc-scripts-0.3.1/rc.d/init.d/functions Wed Jun 26 12:07:57 2002
-@@ -275,7 +275,13 @@
-
- # make sure it doesn't core dump anywhere; while this could mask
- # problems with the daemon, it also closes some security problems
-- ulimit -c 0
-+
-+ # use ULIMIT_C variable - allow to use other limit for some daemons
-+ # (e.g. for sshd with privsep or for debugging purposes)
-+ if [ "$ULIMIT_C" = "" ]; then
-+ ULIMIT_C="-c 0"
-+ fi
-+ ulimit $ULIMIT_C
-
- # Make sure daemons will be able to fork.
- # Limits are set via pam_limits.
--- /dev/null
+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 @@
+ return $exit_code
+ }
+
+-# A function to start a program (now it's usefull on read-only filesystem too)
++# A function to start a program (now it's useful on read-only filesystem too)
+ daemon()
+ {
+- typeset errors="" prog=""
++ typeset errors="" prog="" limits_hard="" limits_soft=""
+ 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
++ # "-u unlimited" (-p for ksh) 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.
++ [ -z "$DEFAULT_SERVICE_LIMITS_HARD" ] && DEFAULT_SERVICE_LIMITS_HARD="-c 0"
++ [ -z "$DEFAULT_SERVICE_LIMITS_SOFT" ] && DEFAULT_SERVICE_LIMITS_SOFT="-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 @@
+ prog="$prog $*"
+ fi
+
+- # make sure it doesn't core dump anywhere; while this could mask
+- # problems with the daemon, it also closes some security problems
+- ulimit -c 0
+-
+- # Make sure daemons will be able to fork.
+- # 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/'`"
+ 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}"
+ 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}"
+ # 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/'`"
++ done
+
+ # And start it up.
+ busy
+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 @@
+ # $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>
++# Use "-u" for process limits (automatically translated to "-p" for ksh).
++# 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"
++
+ # Run isapnp at system startup ?
+ RUN_ISAPNP=yes
+
-# $Id: rc-scripts.spec,v 1.119 2003-08-04 11:35:58 qboosh Exp $
+# $Id: rc-scripts.spec,v 1.120 2003-08-12 21:42: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: 13
+Release: 14
License: GPL
-Vendor: PLD rc-scripts Team <pld-rc-scripts@pld.org.pl>
+Vendor: PLD rc-scripts Team <pld-rc-scripts@pld-linux.org>
Group: Base
Source0: %{name}-%{version}.tar.gz
# Source0-md5: c032946a4ea2c81b92c70b26f65b18d9
-Patch0: %{name}-shared.patch
Patch1: %{name}-ipx_fix.patch
-Patch2: %{name}-ulimitc.patch
+Patch2: %{name}-ulimits.patch
Patch3: %{name}-killgnu.patch
Patch4: %{name}-wlan.patch
Patch5: %{name}-arp-any.patch
Patch13: %{name}-reboot.patch
Patch14: %{name}-pl.po_duplicate.patch
Patch15: %{name}-timezone-posix.patch
-URL: http://cvs.pld.org.pl/index.cgi/rc-scripts/
+Patch16: %{name}-acct.patch
+URL: http://cvs.pld-linux.org/rc-scripts/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext-devel
BuildRequires: glib-devel
%{!?_without_static:BuildRequires: glib-static}
BuildRequires: popt-devel
+Requires(post): fileutils
Requires: /bin/awk
Requires: /bin/basename
Requires: /bin/gettext
Requires: textutils
Requires: utempter
Requires: util-linux
-Obsoletes: initscripts
Provides: initscripts
-Requires(post): fileutils
+Obsoletes: initscripts
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
%define _prefix /usr
%define _exec_prefix /
%prep
%setup -q
-%{!?_without_static:#}%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
+%patch16 -p1
%build
%{__aclocal}
%{__autoconf}
%configure \
--with-localedir=%{localedir}
-%{__make}
+%{__make} \
+ %{?_without_static:ppp_watch_LDADD="-lglib"}
%install
rm -rf $RPM_BUILD_ROOT