]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
Fix is_yes in cpuset stuff. Quote file paths when doing echo > something.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 24 Aug 2005 22:08:11 +0000 (22:08 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 24 Aug 2005 22:08:11 +0000 (22:08 +0000)
svn-id: @6333

rc.d/init.d/cpusets
rc.d/init.d/functions

index eeddf31d3b2ccda44babcf18bdb973bc2499b4db..96fa8e999971e4993be5f13323c7900309772e61 100644 (file)
@@ -18,7 +18,7 @@ NLS_DOMAIN="rc-scripts"
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-if is_yes ${CPUSETS} ; then
+if is_yes "${CPUSETS}" ; then
     if ! grep -q "/dev/cpuset" /proc/mounts ; then
        nls "ERROR: CPUSET support not enabled in kernel or /dev/cpuset not mounted" >&2
     fi
index 034b40e6f711f0ca19c5cfc5f14a669e7d0f821c..f60a554903d018ae1e19d704ebc4965fdd69c48a 100644 (file)
@@ -498,7 +498,7 @@ daemon()
        # And start it up.
        busy
        cd /
-       is_yes $CPUSETS && [ -n "$SERVICE_CPUSET" ] && echo $$ >/dev/cpuset/${SERVICE_CPUSET}/tasks
+       is_yes "$CPUSETS" && [ -n "$SERVICE_CPUSET" ] && echo $$ > "/dev/cpuset/${SERVICE_CPUSET}/tasks"
        if errors=$(umask ${SERVICE_UMASK:-$DEFAULT_SERVICE_UMASK}; USER=root HOME=/tmp TMPDIR=/tmp nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} initlog -c "$prog" 2>&1); then
                if [ -n "$waitname" -a -n "$waittime" ]; then
                        # Save basename.
@@ -690,8 +690,8 @@ status()
 
        if [ "$pid" != "" ]; then
                cpuset_msg="..."
-               if is_yes $CPUSETS && [ -n "$SERVICE_CPUSET" ]; then
-                       if $(grep -q "$pid" /dev/cpuset/${SERVICE_CPUSET}/tasks); then
+               if is_yes "$CPUSETS" && [ -n "$SERVICE_CPUSET" ]; then
+                       if $(grep -q "$pid" "/dev/cpuset/${SERVICE_CPUSET}/tasks"); then
                                cpuset_msg=$(nls " in cpuset %s..." "$SERVICE_CPUSET")
                        else
                                cpuset_msg=$(nls " outside of configured cpuset %s..." "$SERVICE_CPUSET")
@@ -706,8 +706,8 @@ status()
 #                        ((prog ":") == $5)) { print $1 ; exit 0 } }' $1`
 #              if [ "$pid" != "" ]; then
 #                      cpuset_msg="..."
-#                      if is_yes $CPUSETS && [ -n "$SERVICE_CPUSET" ]; then
-#                              if $(grep -q "$pid" /dev/cpuset/${SERVICE_CPUSET}/tasks); then
+#                      if is_yes "$CPUSETS" && [ -n "$SERVICE_CPUSET" ]; then
+#                              if $(grep -q "$pid" "/dev/cpuset/${SERVICE_CPUSET}/tasks"); then
 #                                      cpuset_msg=$(nls " in cpuset %s..." "$SERVICE_CPUSET")
 #                              else
 #                                      cpuset_msg=$(nls " outside of configured cpuset %s..." "$SERVICE_CPUSET")
This page took 0.041245 seconds and 4 git commands to generate.