sambal 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # This is the main Samba configuration file. You should read the
6
6
  # smb.conf(5) manual page in order to understand the options listed
7
- # here. Samba has a huge number of configurable options most of which
7
+ # here. Samba has a huge number of configurable options most of which
8
8
  # are not shown in this example
9
9
  #
10
10
  # Some options that are often worth tuning have been included as
@@ -16,8 +16,8 @@
16
16
  # enough to be mentioned here
17
17
  #
18
18
  # NOTE: Whenever you modify this file you should run the command
19
- # "testparm" to check that you have not made any basic syntactic
20
- # errors.
19
+ # "testparm" to check that you have not made any basic syntactic
20
+ # errors.
21
21
  # A well-established practice is to name the original file
22
22
  # "smb.conf.master" and create the "real" config file with
23
23
  # testparm -s smb.conf.master >smb.conf
@@ -109,7 +109,7 @@
109
109
  encrypt passwords = true
110
110
 
111
111
  # If you are using encrypted passwords, Samba will need to know what
112
- # password database type you are using.
112
+ # password database type you are using.
113
113
  passdb backend = tdbsam
114
114
 
115
115
  # obey pam restrictions = yes
@@ -172,13 +172,13 @@
172
172
  # password; please adapt to your needs
173
173
  ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
174
174
 
175
- # This allows machine accounts to be created on the domain controller via the
176
- # SAMR RPC pipe.
175
+ # This allows machine accounts to be created on the domain controller via the
176
+ # SAMR RPC pipe.
177
177
  # The following assumes a "machines" group exists on the system
178
178
  ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
179
179
 
180
180
  # This allows Unix groups to be created on the domain controller via the SAMR
181
- # RPC pipe.
181
+ # RPC pipe.
182
182
  ; add group script = /usr/sbin/addgroup --force-badname %g
183
183
 
184
184
  ########## Printing ##########
@@ -248,7 +248,7 @@
248
248
  #======================= Share Definitions =======================
249
249
 
250
250
  # Un-comment the following (and tweak the other settings below to suit)
251
- # to enable the default home directory shares. This will share each
251
+ # to enable the default home directory shares. This will share each
252
252
  # user's home director as \\server\username
253
253
  [homes]
254
254
  comment = Home Directories
@@ -14,7 +14,7 @@ class Document
14
14
  def initialize(template)
15
15
  @template = ERB.new(template)
16
16
  end
17
-
17
+
18
18
  def interpolate(replacements = {})
19
19
  @template.result(replacements.to_binding)
20
20
  end
@@ -45,7 +45,7 @@ module Sambal
45
45
  FileUtils.mkdir_p @share_path
46
46
  write_config
47
47
  end
48
-
48
+
49
49
  def find_pids
50
50
  pids = `ps ax | grep smbd | grep #{@port} | grep -v grep | awk '{print \$1}'`.chomp
51
51
  pids.split("\n").map {|p| (p.nil? || p=='') ? nil : p.to_i }
@@ -58,8 +58,14 @@ module Sambal
58
58
  end
59
59
 
60
60
  def start
61
- @smb_server_pid = fork do
62
- `smbd -S -F -s #{@config_path} -p #{@port} --lockdir=#{@lock_path} --piddir=#{@pid_dir}`
61
+ if RUBY_PLATFORM=="java"
62
+ @smb_server_pid = Thread.new do
63
+ `smbd -S -F -s #{@config_path} -p #{@port} --lockdir=#{@lock_path} --piddir=#{@pid_dir}`
64
+ end
65
+ else
66
+ @smb_server_pid = fork do
67
+ `smbd -S -F -s #{@config_path} -p #{@port} --lockdir=#{@lock_path} --piddir=#{@pid_dir}`
68
+ end
63
69
  end
64
70
  sleep 2 ## takes a short time to start up
65
71
  end
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
2
 
3
3
  module Sambal
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sambal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-16 00:00:00.000000000 Z
12
+ date: 2012-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec