debian-forge/mounts/org.osbuild.fat
Christian Kellner 02404ced94 mounts: change schema meta information
Define the mount schema in the actual mounts at a higher level. This
is in preparation to give the modules more control over the `source`
and `target` properties.
2021-10-30 15:32:44 +01:00

48 lines
760 B
Python
Executable file

#!/usr/bin/python3
"""
FAT mount service
Mount a FAT filesystem at the given location.
Host commands used: mount
"""
import sys
from typing import Dict
from osbuild import mounts
SCHEMA_2 = """
"additionalProperties": false,
"required": ["name", "type", "source", "target"],
"properties": {
"name": { "type": "string" },
"type": { "type": "string" },
"source": {
"type": "string"
},
"target": {
"type": "string"
},
"options": {
"type": "object",
"additionalProperties": true
}
}
"""
class XfsMount(mounts.MountService):
def translate_options(self, _options: Dict):
return ["-t", "vfat"]
def main():
service = XfsMount.from_args(sys.argv[1:])
service.main()
if __name__ == '__main__':
main()