]> xn--ix-yja.es Git - alex.git/commitdiff
Add update_zfs command
authoralex <alex@pdp7.net>
Sun, 11 Feb 2024 09:47:47 +0000 (10:47 +0100)
committeralex <alex@pdp7.net>
Sun, 11 Feb 2024 09:47:47 +0000 (10:47 +0100)
scripts/p7s/zfs.py [new file with mode: 0644]
scripts/pyproject.toml

diff --git a/scripts/p7s/zfs.py b/scripts/p7s/zfs.py
new file mode 100644 (file)
index 0000000..d51ff17
--- /dev/null
@@ -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)
index a98507aee921579f2472181e7cc901fb7258d183..7f4b640372b679d84c6410746267ac18ce0f096b 100644 (file)
@@ -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'