diff options
author | Mürsel Türk | 2022-09-14 23:12:36 +0200 |
---|---|---|
committer | Mürsel Türk | 2022-09-14 23:12:36 +0200 |
commit | c37147a07f9830cc6c6084142cbdae53741a2913 (patch) | |
tree | 1bc173cf0125a4c2d4f2f3cd8245d2f8e556d6c3 /inspect.py | |
parent | Rename deb to dpkg (diff) | |
download | vm-inspector-c37147a07f9830cc6c6084142cbdae53741a2913.tar.gz vm-inspector-c37147a07f9830cc6c6084142cbdae53741a2913.tar.xz vm-inspector-c37147a07f9830cc6c6084142cbdae53741a2913.zip |
Add support for alpine linux
Diffstat (limited to 'inspect.py')
-rwxr-xr-x | inspect.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -7,6 +7,7 @@ import sys from tools import libvslvm, lklfuse, nbdfuse, subfiles, unmount, rmdir from tools.inspect_apps import ( + list_applications_apk, list_applications_dpkg, list_applications_pacman, list_applications_rpm, @@ -18,6 +19,7 @@ from tools.pyparted import list_partitions fmt = "{asctime}, {name}:{lineno}:{funcName}(), {levelname}, {message}" logging.basicConfig(level=logging.DEBUG, format=fmt, style="{") +APK = re.compile(r"^(Alpine).*$") DEB = re.compile(r"^(Debian|Ubuntu|Linux\sMint|LMDE).*$") PACMAN = re.compile(r"^(Arch|Manjaro).*$") RPM = re.compile(r"^(CentOS|AlmaLinux|Scientific|Rocky|Oracle|openSUSE|Fedora).*$") # noqa @@ -66,7 +68,9 @@ def main(vmdk_path): os_name = os_info.get("name", "") for fspath, _ in fs_mps: - if DEB.match(os_name): + if APK.match(os_name): + apps = list_applications_apk(fspath) + elif DEB.match(os_name): apps = list_applications_dpkg(fspath) elif PACMAN.match(os_name): apps = list_applications_pacman(fspath) |