summaryrefslogtreecommitdiff
path: root/filesystems/zfs-snapshot-mgmt/files
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2024-09-27 12:48:46 +0200
committerRobert Clausecker <fuz@FreeBSD.org>2024-11-06 16:17:35 +0100
commit6e2da9672f79f44048d597f0f61e4646cdeade9d (patch)
treec92e4b3158e3419e8cec38e00227d08dcdaab3e9 /filesystems/zfs-snapshot-mgmt/files
parentmath/sdpa: speed up build (diff)
filesystems: add new category for file systems and related utilities
The filesystems category houses file systems and file system utilities. It is added mainly to turn the sysutils/fusefs-* pseudo-category into a proper one, but is also useful for the sundry of other file systems related ports found in the tree. Ports that seem like they belong there are moved to the new category. Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are not moved as they currently don't fetch and don't have TIMESTAMP set in their distinfo, but that is required to be able to push a rename of the port by the pre-receive hook. Approved by: portmgr (rene) Reviewed by: mat Pull Request: https://github.com/freebsd/freebsd-ports/pull/302 PR: 281988
Diffstat (limited to 'filesystems/zfs-snapshot-mgmt/files')
-rw-r--r--filesystems/zfs-snapshot-mgmt/files/patch-zfs-snapshot-mgmt32
-rw-r--r--filesystems/zfs-snapshot-mgmt/files/pkg-message.in19
2 files changed, 51 insertions, 0 deletions
diff --git a/filesystems/zfs-snapshot-mgmt/files/patch-zfs-snapshot-mgmt b/filesystems/zfs-snapshot-mgmt/files/patch-zfs-snapshot-mgmt
new file mode 100644
index 000000000000..382543b79b93
--- /dev/null
+++ b/filesystems/zfs-snapshot-mgmt/files/patch-zfs-snapshot-mgmt
@@ -0,0 +1,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
+
diff --git a/filesystems/zfs-snapshot-mgmt/files/pkg-message.in b/filesystems/zfs-snapshot-mgmt/files/pkg-message.in
new file mode 100644
index 000000000000..8b9ac6273efe
--- /dev/null
+++ b/filesystems/zfs-snapshot-mgmt/files/pkg-message.in
@@ -0,0 +1,19 @@
+[
+{ type: install
+ message: <<EOM
+To actually turn on the automatic snapshots you have to do the following:
+
+1. Add an appropriate crontab entry, e.g.:
+
+ echo "*/5 * * * * root %%PREFIX%%/bin/zfs-snapshot-mgmt" >> /etc/crontab
+
+See zfs-snapshot-mgmt(8) manpage for more details.
+EOM
+},
+{ type: remove
+ message: <<EOM
+Remember to remove zfs-snapshot-mgmt entry from cron configuration.
+Otherwise the system will be constantly trying to call the deinstalled script.
+EOM
+}
+]