adding some changes

This commit is contained in:
brent s 2021-01-19 01:12:07 -05:00
parent 11a2db0acb
commit b740d2bfff
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
2 changed files with 29 additions and 0 deletions

View File

@ -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

View File

@ -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 = {}