bin/asl-samba-userdel in activesambaldap-0.0.3 vs bin/asl-samba-userdel in activesambaldap-0.0.4
- old
+ new
@@ -1,10 +1,12 @@
#!/usr/bin/env ruby
require 'active_samba_ldap'
require 'active_samba_ldap/command'
+include ActiveSambaLdap::GetTextSupport
+
argv, opts, options = ActiveSambaLdap::Command.parse_options do |opts, options|
opts.banner += " USER_NAME"
end
name = nil
@@ -14,11 +16,11 @@
$stderr.puts opts
exit 1
end
unless Process.uid.zero?
- $stderr.puts "need root authority."
+ $stderr.puts(_("need root authority."))
exit 1
end
ActiveSambaLdap::Base.establish_connection("update")
@@ -33,10 +35,10 @@
class Group < ActiveSambaLdap::Group
ldap_mapping :recommended_classes => []
end
unless User.exists?(name)
- $stderr.puts "user '#{name}' doesn't exist."
+ $stderr.puts(_("user doesn't exist: %s") % name)
exit 1
end
user = User.find(name)
user.destroy(:removed_from_group => true, :remove_home_directory => true)