From 183d57d6d2aeb05d37bef3896badd9a20a6c541f Mon Sep 17 00:00:00 2001 From: Takashi Yoshi Date: Fri, 14 Dec 2018 12:43:57 +0100 Subject: [PATCH 1/6] [type/__sysctl] Fix spelling of FreeBSD --- cdist/conf/type/__sysctl/gencode-remote | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/conf/type/__sysctl/gencode-remote b/cdist/conf/type/__sysctl/gencode-remote index a7aedb84..888ca117 100755 --- a/cdist/conf/type/__sysctl/gencode-remote +++ b/cdist/conf/type/__sysctl/gencode-remote @@ -31,7 +31,7 @@ case "$os" in redhat|centos|ubuntu|debian|devuan|archlinux|coreos) flag='-w' ;; - frebsd) + freebsd) flag='' ;; esac From b36716ef3619ff9881be98b0fa896ade7456a8e0 Mon Sep 17 00:00:00 2001 From: Takashi Yoshi Date: Fri, 14 Dec 2018 12:44:41 +0100 Subject: [PATCH 2/6] [type/__sysctl] Add OpenBSD support --- cdist/conf/type/__sysctl/gencode-remote | 3 ++- cdist/conf/type/__sysctl/manifest | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cdist/conf/type/__sysctl/gencode-remote b/cdist/conf/type/__sysctl/gencode-remote index 888ca117..76e5f528 100755 --- a/cdist/conf/type/__sysctl/gencode-remote +++ b/cdist/conf/type/__sysctl/gencode-remote @@ -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. # @@ -31,7 +32,7 @@ case "$os" in redhat|centos|ubuntu|debian|devuan|archlinux|coreos) flag='-w' ;; - freebsd) + freebsd|openbsd) flag='' ;; esac diff --git a/cdist/conf/type/__sysctl/manifest b/cdist/conf/type/__sysctl/manifest index 6e337ccb..43feec04 100755 --- a/cdist/conf/type/__sysctl/manifest +++ b/cdist/conf/type/__sysctl/manifest @@ -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,7 @@ os=$(cat "$__global/explorer/os") case "$os" in - redhat|centos|ubuntu|debian|devuan|archlinux|coreos|freebsd) + redhat|centos|ubuntu|debian|devuan|archlinux|coreos|freebsd|openbsd) : ;; *) From 566feba5b16b6eb56371fe0fa669d83c1d929bfc Mon Sep 17 00:00:00 2001 From: Takashi Yoshi Date: Fri, 14 Dec 2018 12:55:03 +0100 Subject: [PATCH 3/6] [type/__sysctl] Add NetBSD support --- cdist/conf/type/__sysctl/gencode-remote | 2 +- cdist/conf/type/__sysctl/manifest | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cdist/conf/type/__sysctl/gencode-remote b/cdist/conf/type/__sysctl/gencode-remote index 76e5f528..873932ba 100755 --- a/cdist/conf/type/__sysctl/gencode-remote +++ b/cdist/conf/type/__sysctl/gencode-remote @@ -29,7 +29,7 @@ fi os=$(cat "$__global/explorer/os") case "$os" in - redhat|centos|ubuntu|debian|devuan|archlinux|coreos) + redhat|centos|ubuntu|debian|devuan|archlinux|coreos|netbsd) flag='-w' ;; freebsd|openbsd) diff --git a/cdist/conf/type/__sysctl/manifest b/cdist/conf/type/__sysctl/manifest index 43feec04..df3ff13c 100755 --- a/cdist/conf/type/__sysctl/manifest +++ b/cdist/conf/type/__sysctl/manifest @@ -23,7 +23,12 @@ os=$(cat "$__global/explorer/os") case "$os" in - redhat|centos|ubuntu|debian|devuan|archlinux|coreos|freebsd|openbsd) + # Linux + redhat|centos|ubuntu|debian|devuan|archlinux|coreos) + : + ;; + # BSD + freebsd|netbsd|openbsd) : ;; *) From 45ff67c0f55ece10c4265e8ab187b78ec432f1de Mon Sep 17 00:00:00 2001 From: Takashi Yoshi Date: Fri, 14 Dec 2018 13:06:31 +0100 Subject: [PATCH 4/6] [type/__sysctl] Add Mac OS X support --- cdist/conf/type/__sysctl/gencode-remote | 8 +++++++- cdist/conf/type/__sysctl/manifest | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cdist/conf/type/__sysctl/gencode-remote b/cdist/conf/type/__sysctl/gencode-remote index 873932ba..e17e0659 100755 --- a/cdist/conf/type/__sysctl/gencode-remote +++ b/cdist/conf/type/__sysctl/gencode-remote @@ -31,7 +31,13 @@ os=$(cat "$__global/explorer/os") case "$os" in redhat|centos|ubuntu|debian|devuan|archlinux|coreos|netbsd) 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' + ;; freebsd|openbsd) flag='' ;; diff --git a/cdist/conf/type/__sysctl/manifest b/cdist/conf/type/__sysctl/manifest index df3ff13c..b4e2e902 100755 --- a/cdist/conf/type/__sysctl/manifest +++ b/cdist/conf/type/__sysctl/manifest @@ -28,7 +28,7 @@ case "$os" in : ;; # BSD - freebsd|netbsd|openbsd) + freebsd|macosx|netbsd|openbsd) : ;; *) From 92610fe76c6875ee4aa6b31bf5b2be23e5149305 Mon Sep 17 00:00:00 2001 From: Takashi Yoshi Date: Fri, 14 Dec 2018 13:45:03 +0100 Subject: [PATCH 5/6] [type/__sysctl] Add support for Alpine Linux, Gentoo and OpenWrt --- cdist/conf/type/__sysctl/gencode-remote | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/conf/type/__sysctl/gencode-remote b/cdist/conf/type/__sysctl/gencode-remote index e17e0659..d1da6058 100755 --- a/cdist/conf/type/__sysctl/gencode-remote +++ b/cdist/conf/type/__sysctl/gencode-remote @@ -29,7 +29,7 @@ fi os=$(cat "$__global/explorer/os") case "$os" in - redhat|centos|ubuntu|debian|devuan|archlinux|coreos|netbsd) + redhat|centos|ubuntu|debian|devuan|alpine|archlinux|gentoo|openwrt|coreos|netbsd) flag='-w' ;; macosx) From 9acb9d1f3aa7ffa9c10f4be1d8eb8c3ed6b3e251 Mon Sep 17 00:00:00 2001 From: Takashi Yoshi Date: Fri, 14 Dec 2018 14:12:33 +0100 Subject: [PATCH 6/6] [type/__sysctl] Group entries --- cdist/conf/type/__sysctl/gencode-remote | 32 +++++++++++++++---------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/cdist/conf/type/__sysctl/gencode-remote b/cdist/conf/type/__sysctl/gencode-remote index d1da6058..711d54e5 100755 --- a/cdist/conf/type/__sysctl/gencode-remote +++ b/cdist/conf/type/__sysctl/gencode-remote @@ -29,18 +29,26 @@ fi os=$(cat "$__global/explorer/os") case "$os" in - redhat|centos|ubuntu|debian|devuan|alpine|archlinux|gentoo|openwrt|coreos|netbsd) - 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' - ;; - freebsd|openbsd) - flag='' - ;; + # Linux + redhat|centos|ubuntu|debian|devuan|archlinux|gentoo|coreos) + flag='-w' + ;; + # 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 # set the current runtime value