forked from ungleich-public/cdist
		
	Merge branch 'fix/type/__sysctl/netbsd-path' into 'master'
__sysctl: Fix on NetBSD See merge request ungleich-public/cdist!918
This commit is contained in:
		
				commit
				
					
						a5f25faf25
					
				
			
		
					 3 changed files with 16 additions and 2 deletions
				
			
		|  | @ -1,4 +1,4 @@ | ||||||
| #!/bin/sh | #!/bin/sh -e | ||||||
| # | # | ||||||
| # 2014 Steven Armstrong (steven-cdist at armstrong.cc) | # 2014 Steven Armstrong (steven-cdist at armstrong.cc) | ||||||
| # | # | ||||||
|  | @ -18,5 +18,10 @@ | ||||||
| # along with cdist. If not, see <http://www.gnu.org/licenses/>. | # along with cdist. If not, see <http://www.gnu.org/licenses/>. | ||||||
| # | # | ||||||
| 
 | 
 | ||||||
|  | if test "$(uname -s)" = NetBSD | ||||||
|  | then | ||||||
|  | 	PATH=$(getconf PATH) | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| # get the current runtime value | # get the current runtime value | ||||||
| sysctl -n "$__object_id" || true | sysctl -n "${__object_id}" || true | ||||||
|  |  | ||||||
|  | @ -44,6 +44,8 @@ case "$os" in | ||||||
|       flag='-w' |       flag='-w' | ||||||
|       ;; |       ;; | ||||||
|    netbsd) |    netbsd) | ||||||
|  |       # shellcheck disable=SC2016 | ||||||
|  |       echo 'PATH=$(getconf PATH)' | ||||||
|       flag='-w' |       flag='-w' | ||||||
|       ;; |       ;; | ||||||
|    freebsd|openbsd) |    freebsd|openbsd) | ||||||
|  |  | ||||||
|  | @ -26,6 +26,13 @@ EXAMPLES | ||||||
| 
 | 
 | ||||||
|     __sysctl net.ipv4.ip_forward --value 1 |     __sysctl net.ipv4.ip_forward --value 1 | ||||||
| 
 | 
 | ||||||
|  |     # On some operating systems, e.g. NetBSD, to prevent an error if the | ||||||
|  |     # MIB style name does not exist (e.g. optional kernel components), | ||||||
|  |     # name and value can be separated by `?=`. The same effect can be achieved | ||||||
|  |     # in cdist by appending a `?` to the key: | ||||||
|  | 
 | ||||||
|  |     __sysctl ddb.onpanic? --value -1 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| AUTHORS | AUTHORS | ||||||
| ------- | ------- | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue