Merge pull request #731 from sideeffect42/sysctl-more-oses

Better OS support for __sysctl type
This commit is contained in:
Darko Poljak 2018-12-14 15:19:17 +01:00 committed by GitHub
commit 77d69c987d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 7 deletions

View file

@ -1,6 +1,7 @@
#!/bin/sh -e
#
# 2014 Steven Armstrong (steven-cdist at armstrong.cc)
# 2018 Takashi Yoshi (takashi at yoshi.email)
#
# This file is part of cdist.
#
@ -28,10 +29,24 @@ fi
os=$(cat "$__global/explorer/os")
case "$os" in
redhat|centos|ubuntu|debian|devuan|archlinux|coreos)
# Linux
redhat|centos|ubuntu|debian|devuan|archlinux|gentoo|coreos)
flag='-w'
;;
frebsd)
# BusyBox
alpine|openwrt)
flag='-w'
;;
macosx)
# NOTE: Older versions of Mac OS X require the -w option.
# Even though the flag is not mentioned in new man pages anymore,
# it still works.
flag='-w'
;;
netbsd)
flag='-w'
;;
freebsd|openbsd)
flag=''
;;
esac

View file

@ -1,6 +1,7 @@
#!/bin/sh -e
#
# 2014 Steven Armstrong (steven-cdist at armstrong.cc)
# 2018 Takashi Yoshi (takashi at yoshi.email)
#
# This file is part of cdist.
#
@ -22,7 +23,12 @@
os=$(cat "$__global/explorer/os")
case "$os" in
redhat|centos|ubuntu|debian|devuan|archlinux|coreos|freebsd)
# Linux
redhat|centos|ubuntu|debian|devuan|archlinux|coreos)
:
;;
# BSD
freebsd|macosx|netbsd|openbsd)
:
;;
*)