From 1116bcc504bb1ebba99d75e2fa9be1589ecb6480 Mon Sep 17 00:00:00 2001 From: Jake Guffey Date: Tue, 14 Aug 2012 08:39:33 -0400 Subject: [PATCH 1/2] Migrate from useradd/usermod to pw useradd/usermod don't exist in freebsd. --- conf/type/__user/gencode-remote | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/conf/type/__user/gencode-remote b/conf/type/__user/gencode-remote index 7e175f60..baa6f354 100755 --- a/conf/type/__user/gencode-remote +++ b/conf/type/__user/gencode-remote @@ -24,6 +24,8 @@ name="$__object_id" +os="$(cat "$__global/explorer/os")" + # We need to shorten options for both usermod and useradd since on some # systems (such as *BSD, Darwin) those commands do not handle GNU style long # options. @@ -89,7 +91,11 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then done if [ $# -gt 0 ]; then - echo usermod "$@" "$name" + if [ "$os" = "freebsd" ]; then + echo pw usermod "$@" "$name" + else + echo usermod "$@" "$name" + fi else true fi @@ -99,5 +105,9 @@ else set -- "$@" "$(shorten_property $property)" \'$new_value\' done - echo useradd "$@" "$name" + if [ "$os" = "freebsd" ]; then + echo pw useradd "$@" "$name" + else + echo useradd "$@" "$name" + fi fi From b6bff3a5515c6cf5a0ef4297c28e7cc1d58f2aa7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 7 Sep 2012 14:06:19 +0200 Subject: [PATCH 2/2] version bump Signed-off-by: Nico Schottelius --- doc/changelog | 2 +- lib/cdist/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/changelog b/doc/changelog index 589e3100..add17af2 100644 --- a/doc/changelog +++ b/doc/changelog @@ -4,7 +4,7 @@ Changelog * Changes are always commented with their author in (braces) * Exception: No braces means author == Nico Schottelius -2.0.14: +2.0.14: 2012-09-07 * Bugfix Type: __jail: Use correct variable (Jake Guffey) * Change Type: __jail: Parameter jailbase now optional (Jake Guffey) * Bugfix Type: __user: Use passwd database on FreeBSD (Jake Guffey) diff --git a/lib/cdist/__init__.py b/lib/cdist/__init__.py index 02df2f2f..85bc5f77 100644 --- a/lib/cdist/__init__.py +++ b/lib/cdist/__init__.py @@ -29,7 +29,7 @@ try: 'cd "%s" && git describe' % here, stderr=devnull, shell=True).decode('utf-8') except: - VERSION = "2.0.13" + VERSION = "2.0.14" BANNER = """ .. . .x+=:. s