summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/p7s/zfs.py6
-rw-r--r--scripts/pyproject.toml1
2 files changed, 7 insertions, 0 deletions
diff --git a/scripts/p7s/zfs.py b/scripts/p7s/zfs.py
new file mode 100644
index 00000000..d51ff17c
--- /dev/null
+++ b/scripts/p7s/zfs.py
@@ -0,0 +1,6 @@
+import subprocess
+
+
+def update_zfs():
+ version = subprocess.run(["rpm", "-q", "zfs-dkms", '--queryformat=%{VERSION}'], check=True, stdout=subprocess.PIPE, encoding="utf8").stdout
+ subprocess.run(["sudo", "dkms", "install", f"zfs/{version}"], check=True)
diff --git a/scripts/pyproject.toml b/scripts/pyproject.toml
index a98507ae..7f4b6403 100644
--- a/scripts/pyproject.toml
+++ b/scripts/pyproject.toml
@@ -25,3 +25,4 @@ nextcloud_setup = 'p7s.nextcloud:setup_nextcloud'
soju_setup = 'p7s.soju:setup_soju'
bitlbee_setup = 'p7s.bitlbee:setup_bitlbee'
setup_emacs = 'p7s.emacs:setup_emacs'
+update_zfs = 'p7s.zfs:update_zfs'