summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-20 19:12:01 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-20 19:12:01 +0000
commite605c4aadd3a3c4cccbd01661c21a715ec3f0773 (patch)
treebb8661ba0e56920ca4e87a74b46da0e63749f6b7
parent41562cc9a2e0d491ccd1c6627292c46b6e442903 (diff)
downloadpuppet-e605c4aadd3a3c4cccbd01661c21a715ec3f0773.tar.gz
puppet-e605c4aadd3a3c4cccbd01661c21a715ec3f0773.tar.xz
puppet-e605c4aadd3a3c4cccbd01661c21a715ec3f0773.zip
Adding some defaults to users, mostly for darwin because it is kinda stupid when it comes to this info
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1959 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-xlib/puppet/type/user.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb
index e9cd2372e..e3bd6eb98 100755
--- a/lib/puppet/type/user.rb
+++ b/lib/puppet/type/user.rb
@@ -173,16 +173,32 @@ module Puppet
newstate(:comment) do
desc "A description of the user. Generally is a user's full name."
+
+ defaultto do
+ "%s User" % @parent.title.capitalize
+ end
end
newstate(:home) do
desc "The home directory of the user. The directory must be created
separately and is not currently checked for existence."
+
+ defaultto do
+ if Facter.value(:operatingsystem) == "Darwin"
+ "/var/empty"
+ end
+ end
end
newstate(:shell) do
desc "The user's login shell. The shell must exist and be
executable."
+
+ defaultto do
+ if Facter.value(:operatingsystem) == "Darwin"
+ "/usr/bin/false"
+ end
+ end
end
newstate(:groups) do