blob: 382543b79b93ab75c4e3eac93fb0b02177cb9004 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
--- zfs-snapshot-mgmt~
+++ zfs-snapshot-mgmt
@@ -154,7 +154,11 @@ class FSInfo
end
def pool
+ if name["/"]
name[/\A.*?\//].chop
+ else
+ name
+ end
end
private
@@ -175,7 +179,7 @@ private
end
-class Config
+class ZConfig
attr_reader :snapshot_prefix, :filesystems, :pools
def initialize(value)
@@ -194,7 +198,7 @@ class Config
config_yaml = File.open(CONFIG_FILE_NAME).read(CONFIG_SIZE_MAX)
die "Config file too long" if config_yaml.nil?
-config = Config.new(YAML::load(config_yaml))
+config = ZConfig.new(YAML::load(config_yaml))
now_minutes = Time.now.to_i / 60
|