Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

die tabs

  • Loading branch information...
commit 9c7391a1f9ca6270171210dbb59133e38ff19b2c 1 parent 6c3974c
@jtimberman jtimberman authored
View
12 samba/attributes/default.rb
@@ -30,12 +30,12 @@
case platform
when "arch"
- set["samba"]["config"] = "/etc/samba/smb.conf"
- set["samba"]["log_dir"] = "/var/log/samba/log.%m"
+ set["samba"]["config"] = "/etc/samba/smb.conf"
+ set["samba"]["log_dir"] = "/var/log/samba/log.%m"
when "redhat","centos","fedora"
- set["samba"]["config"] = "/etc/samba/smb.conf"
- set["samba"]["log_dir"] = "/var/log/samba/log.%m"
+ set["samba"]["config"] = "/etc/samba/smb.conf"
+ set["samba"]["log_dir"] = "/var/log/samba/log.%m"
else
- set["samba"]["config"] = "/etc/samba/smb.conf"
- set["samba"]["log_dir"] = "/var/log/samba/%m.log"
+ set["samba"]["config"] = "/etc/samba/smb.conf"
+ set["samba"]["log_dir"] = "/var/log/samba/%m.log"
end
View
2  samba/metadata.json
@@ -46,5 +46,5 @@
"samba::client": "Installs smbclient package",
"samba::server": "Installs samba server packages and configures smb.conf"
},
- "version": "0.10.1"
+ "version": "0.10.2"
}
View
2  samba/metadata.rb
@@ -3,7 +3,7 @@
license "Apache 2.0"
description "Installs/Configures samba"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "0.10.1"
+version "0.10.2"
recipe "samba::default", "Includes the samba::client recipe"
recipe "samba::client", "Installs smbclient package"
View
52 samba/providers/user.rb
@@ -22,40 +22,40 @@
include Chef::Mixin::ShellOut
action :create do
- unless @smbuser.exists
- pw = new_resource.password
- execute "Create #{new_resource.name}" do
- command "echo -ne '#{pw}\n#{pw}\n' | smbpasswd -s -a #{new_resource.name}"
- end
- new_resource.updated_by_last_action = true
- end
+ unless @smbuser.exists
+ pw = new_resource.password
+ execute "Create #{new_resource.name}" do
+ command "echo -ne '#{pw}\n#{pw}\n' | smbpasswd -s -a #{new_resource.name}"
+ end
+ new_resource.updated_by_last_action = true
+ end
end
action :enable do
- if @smbuser.disabled
- execute "Enable #{new_resource.name}" do
- command "smbpasswd -e #{new_resource.name}"
- end
- new_resource.updated_by_last_action = true
- end
+ if @smbuser.disabled
+ execute "Enable #{new_resource.name}" do
+ command "smbpasswd -e #{new_resource.name}"
+ end
+ new_resource.updated_by_last_action = true
+ end
end
action :delete do
- if @smbuser.exists
- execute "Delete #{new_resource.name}" do
- command "smbpasswd -x #{new_resource.name}"
- end
- new_resource.updated_by_last_action = true
- end
+ if @smbuser.exists
+ execute "Delete #{new_resource.name}" do
+ command "smbpasswd -x #{new_resource.name}"
+ end
+ new_resource.updated_by_last_action = true
+ end
end
def load_current_resource
- @smbuser = Chef::Resource::SambaUser.new(new_resource.name)
+ @smbuser = Chef::Resource::SambaUser.new(new_resource.name)
- Chef::Log.debug("Checking for smbuser #{new_resource.name}")
- u = shell_out("pdbedit -Lv -u #{new_resource.name}")
- exists = u.stdout.include?(new_resource.name)
- disabled = u.stdout.include?("Account Flags.*[D")
- @smbuser.exists(exists)
- @smbuser.disabled(disabled)
+ Chef::Log.debug("Checking for smbuser #{new_resource.name}")
+ u = shell_out("pdbedit -Lv -u #{new_resource.name}")
+ exists = u.stdout.include?(new_resource.name)
+ disabled = u.stdout.include?("Account Flags.*[D")
+ @smbuser.exists(exists)
+ @smbuser.disabled(disabled)
end
Please sign in to comment.
Something went wrong with that request. Please try again.