summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrent s <r00t@square-r00t.net>2021-01-19 01:12:07 -0500
committerbrent s <r00t@square-r00t.net>2021-01-19 01:12:07 -0500
commitb740d2bfff7994ef6f2de44fc913db2dde6b514b (patch)
treeb032769e8ff984caf82284b4413629b5738eafa8
parent11a2db0acb8781114210fcb9e21750809e859489 (diff)
downloadOpTools-b740d2bfff7994ef6f2de44fc913db2dde6b514b.tar.xz
adding some changes
-rw-r--r--sys/BootSync/bootsync.hook13
-rw-r--r--sys/find_dupes.py16
2 files changed, 29 insertions, 0 deletions
diff --git a/sys/BootSync/bootsync.hook b/sys/BootSync/bootsync.hook
index 36ff48b..54ab194 100644
--- a/sys/BootSync/bootsync.hook
+++ b/sys/BootSync/bootsync.hook
@@ -8,7 +8,20 @@ Operation = Upgrade
Operation = Remove
Type = File
Target = boot/*
+Target = usr/lib/modules/*/vmlinuz
+Target = usr/lib/initcpio/*
+
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Type = Package
+Target = linux
+Target = mkinitcpio
[Action]
When = PostTransaction
Exec = /usr/local/bin/bootsync
+Depends = python-magic
+Depends = python-psutil
+Depends = python-lxml
diff --git a/sys/find_dupes.py b/sys/find_dupes.py
index e69de29..e50ca05 100644
--- a/sys/find_dupes.py
+++ b/sys/find_dupes.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+
+import argparse
+import hashlib
+import os
+
+
+_supported_hashes = hashlib.algorithms_available
+
+
+class Hasher(object):
+ def __init__(self, hashalgo = None):
+ if hashalgo not in _supported_hashes:
+ raise ValueError('hashalgo not in supported hash algorithm types')
+ self.hash = hashlib.new(hashalgo)
+ self.hashes = {}