summaryrefslogtreecommitdiff
path: root/lib/chef/provider/group/pw.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/group/pw.rb')
-rw-r--r--lib/chef/provider/group/pw.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/chef/provider/group/pw.rb b/lib/chef/provider/group/pw.rb
index 3bf67a515a..66da8281be 100644
--- a/lib/chef/provider/group/pw.rb
+++ b/lib/chef/provider/group/pw.rb
@@ -6,9 +6,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,21 +20,21 @@ class Chef
class Provider
class Group
class Pw < Chef::Provider::Group
-
+
def load_current_resource
super
end
-
+
def define_resource_requirements
super
- requirements.assert(:all_actions) do |a|
- a.assertion { ::File.exists?("/usr/sbin/pw") }
+ requirements.assert(:all_actions) do |a|
+ a.assertion { ::File.exists?("/usr/sbin/pw") }
a.failure_message Chef::Exceptions::Group, "Could not find binary /usr/sbin/pw for #{@new_resource}"
# No whyrun alternative: this component should be available in the base install of any given system that uses it
end
end
-
+
# Create the group
def create_group
command = "pw groupadd"
@@ -42,7 +42,7 @@ class Chef
command << set_members_option
run_command(:command => command)
end
-
+
# Manage the group when it already exists
def manage_group
command = "pw groupmod"
@@ -50,12 +50,12 @@ class Chef
command << set_members_option
run_command(:command => command)
end
-
+
# Remove the group
def remove_group
run_command(:command => "pw groupdel #{@new_resource.group_name}")
end
-
+
# Little bit of magic as per Adam's useradd provider to pull and assign the command line flags
#
# ==== Returns
@@ -86,7 +86,7 @@ class Chef
end
opt
end
-
+
end
end
end