>Number:         174053
>Category:       conf
>Synopsis:       [patch] fix etc/rc.d/sysctl to work with values that contain 
>spaces
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 02 13:20:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     [email protected]
>Release:        
>Organization:
>Environment:
>Description:
the etc/rc.d/sysctl script attempts to get the current value of a sysctl and 
skip setting it if it is already equal to the target value. if the value 
contains spaces the check fails and that line of sysctl.conf is skipped.
adding quotes around the check solves this.

example line to test:
dev.hdaa.0.nid5_config=as=15\ seq=0\ conn=None
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: etc/rc.d/sysctl
===================================================================
--- etc/rc.d/sysctl     (revision 243646)
+++ etc/rc.d/sysctl     (working copy)
@@ -29,7 +29,7 @@
                                mib=${var%=*}
                                val=${var#*=}
 
-                               if current_value=`${SYSCTL} -n ${mib} 
2>/dev/null`; then
+                               if current_value=`${SYSCTL} -n "${mib}" 
2>/dev/null`; then
                                        case ${current_value} in
                                        ${val})
                                                ;;


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to