]> git.pld-linux.org Git - packages/rc-scripts.git/commitdiff
- changed ulimits patch: use one variable, normally set both soft and hard rc-scripts-0_3_1-16
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 25 Aug 2003 21:37:01 +0000 (21:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  limits at the same time - but allow using -Sx/-Hx for only soft/hard limit
- release 15

Changed files:
    rc-scripts-ulimits.patch -> 1.2
    rc-scripts.spec -> 1.121

rc-scripts-ulimits.patch
rc-scripts.spec

index 25bd037e26aef6e042d8ce005559c5f175fe37a0..fb4477c6b22bfc3e07d6442de3003bb931f6810d 100644 (file)
@@ -1,7 +1,7 @@
 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
  }
  
@@ -10,7 +10,7 @@ diff -Nur rc-scripts-0.3.1.orig/rc.d/init.d/functions rc-scripts-0.3.1/rc.d/init
  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
@@ -18,13 +18,12 @@ diff -Nur rc-scripts-0.3.1.orig/rc.d/init.d/functions rc-scripts-0.3.1/rc.d/init
 +      # "-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
  
@@ -36,26 +35,19 @@ diff -Nur rc-scripts-0.3.1.orig/rc.d/init.d/functions rc-scripts-0.3.1/rc.d/init
 -      # 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.
@@ -63,21 +55,20 @@ diff -Nur rc-scripts-0.3.1.orig/rc.d/init.d/functions rc-scripts-0.3.1/rc.d/init
 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
index 7fe69bc744cb595598e6bf3641719e6f82a12785..31fe1bd7db45797570bc7ec08ca0c56bb9cd6bd1 100644 (file)
@@ -1,4 +1,4 @@
-# $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
@@ -6,7 +6,7 @@ Summary(pl):    inittab i skrypty startowe z katalogu /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
@@ -65,7 +65,7 @@ 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
+Conflicts:     openssh-server < 2:3.6.1p2-6
 
 %define                _prefix         /usr
 %define                _exec_prefix    /
@@ -124,14 +124,15 @@ programc
 %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
This page took 0.044673 seconds and 4 git commands to generate.