forked from ungleich-public/cdist
Merge pull request #731 from sideeffect42/sysctl-more-oses
Better OS support for __sysctl type
This commit is contained in:
commit
77d69c987d
2 changed files with 28 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
#
|
#
|
||||||
# 2014 Steven Armstrong (steven-cdist at armstrong.cc)
|
# 2014 Steven Armstrong (steven-cdist at armstrong.cc)
|
||||||
|
# 2018 Takashi Yoshi (takashi at yoshi.email)
|
||||||
#
|
#
|
||||||
# This file is part of cdist.
|
# This file is part of cdist.
|
||||||
#
|
#
|
||||||
|
@ -28,10 +29,24 @@ fi
|
||||||
|
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
case "$os" in
|
case "$os" in
|
||||||
redhat|centos|ubuntu|debian|devuan|archlinux|coreos)
|
# Linux
|
||||||
|
redhat|centos|ubuntu|debian|devuan|archlinux|gentoo|coreos)
|
||||||
flag='-w'
|
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=''
|
flag=''
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
#
|
#
|
||||||
# 2014 Steven Armstrong (steven-cdist at armstrong.cc)
|
# 2014 Steven Armstrong (steven-cdist at armstrong.cc)
|
||||||
|
# 2018 Takashi Yoshi (takashi at yoshi.email)
|
||||||
#
|
#
|
||||||
# This file is part of cdist.
|
# This file is part of cdist.
|
||||||
#
|
#
|
||||||
|
@ -22,7 +23,12 @@
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
redhat|centos|ubuntu|debian|devuan|archlinux|coreos|freebsd)
|
# Linux
|
||||||
|
redhat|centos|ubuntu|debian|devuan|archlinux|coreos)
|
||||||
|
:
|
||||||
|
;;
|
||||||
|
# BSD
|
||||||
|
freebsd|macosx|netbsd|openbsd)
|
||||||
:
|
:
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue