From 7ecf592f5b83f6c5bf9ddf6e7fe2d2c6869e2a81 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 2 Jun 2021 15:19:49 +0000 Subject: [PATCH] mounts/ext4: mount support for ext4 file systems Host service to mount an ext4 file system. --- mounts/org.osbuild.ext4 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 mounts/org.osbuild.ext4 diff --git a/mounts/org.osbuild.ext4 b/mounts/org.osbuild.ext4 new file mode 100755 index 00000000..cef5a3a6 --- /dev/null +++ b/mounts/org.osbuild.ext4 @@ -0,0 +1,33 @@ +#!/usr/bin/python3 +""" +ext4 mount service + +Mount a ext4 filesystem at the given location. + +Host commands used: mount +""" + +import sys +from typing import Dict + +from osbuild import mounts + + +SCHEMA = """ +"additionalProperties": false +""" + + +class Ext4Mount(mounts.MountService): + + def translate_options(self, _options: Dict): + return ["-t", "ext4"] + + +def main(): + service = Ext4Mount.from_args(sys.argv[1:]) + service.main() + + +if __name__ == '__main__': + main()