kuzushi 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/kuzushi +8 -3
- data/lib/kuzushi.rb +6 -6
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
data/bin/kuzushi
CHANGED
@@ -5,9 +5,14 @@ require File.dirname(__FILE__) + '/../lib/kuzushi'
|
|
5
5
|
usage = "usage: kuzushi start URL"
|
6
6
|
|
7
7
|
fail(usage) unless ARGV.length == 2
|
8
|
-
fail(usage) unless ARGV[0] == "start"
|
9
8
|
|
10
|
-
|
9
|
+
kuzushi = Kuzushi.new(ARGV[1])
|
11
10
|
|
12
|
-
|
11
|
+
if ARGV[0] == "start"
|
12
|
+
kuzushi.start
|
13
|
+
elsif ARGV[0] == "init"
|
14
|
+
kuzushi.init
|
15
|
+
else
|
16
|
+
fail(usage)
|
17
|
+
end
|
13
18
|
|
data/lib/kuzushi.rb
CHANGED
@@ -110,8 +110,8 @@ class Kuzushi
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def process_volumes(v)
|
113
|
-
handle_ebs v if v.
|
114
|
-
handle_raid v if v.
|
113
|
+
handle_ebs v if v.media == "ebs"
|
114
|
+
handle_raid v if v.media == "raid"
|
115
115
|
set_readahead v if v.readahead
|
116
116
|
set_scheduler v if v.scheduler
|
117
117
|
handle_format v if v.format
|
@@ -149,7 +149,7 @@ class Kuzushi
|
|
149
149
|
end
|
150
150
|
|
151
151
|
def mounted?(dev)
|
152
|
-
!!system.filesystem[dev]["mount"]
|
152
|
+
!!system.filesystem[File.basename(dev)]["mount"] rescue false
|
153
153
|
end
|
154
154
|
|
155
155
|
def package_arch
|
@@ -161,7 +161,7 @@ class Kuzushi
|
|
161
161
|
task "setting up #{f.file}" do
|
162
162
|
@system = system
|
163
163
|
t = ERB.new File.read(file), 0, '<>'
|
164
|
-
File.open(f.file,"w") { |f| f.write(t.
|
164
|
+
File.open(f.file,"w") { |f| f.write(t.result) }
|
165
165
|
end
|
166
166
|
end
|
167
167
|
end
|
@@ -189,7 +189,7 @@ class Kuzushi
|
|
189
189
|
def handle_format(v)
|
190
190
|
task "formatting #{v.device}", :init => true do
|
191
191
|
label = "-L " + v.label rescue ""
|
192
|
-
"mkfs.#{v.format} #{label} #{v.device}"
|
192
|
+
shell "mkfs.#{v.format} #{label} #{v.device}"
|
193
193
|
end
|
194
194
|
add_package "xfsprogs" if v.format == "xfs"
|
195
195
|
end
|
@@ -279,7 +279,7 @@ class Kuzushi
|
|
279
279
|
@init ||= false
|
280
280
|
end
|
281
281
|
|
282
|
-
def task(description, options = {} &blk)
|
282
|
+
def task(description, options = {}, &blk)
|
283
283
|
return if options[:init] and not init?
|
284
284
|
@tasks << { :description => description, :blk => blk }
|
285
285
|
end
|