changed from device to filebased
authorft
Wed, 21 May 2014 11:39:02 +0200
changeset 521d27339c811
parent 4 da49f2de14ae
child 6 54376f0cb016
changed from device to filebased
src/encryptionprovider.py
     1.1 --- a/src/encryptionprovider.py	Thu May 15 10:16:06 2014 +0200
     1.2 +++ b/src/encryptionprovider.py	Wed May 21 11:39:02 2014 +0200
     1.3 @@ -14,7 +14,7 @@
     1.4  
     1.5  MINOPTS = { "Main" : ["LogFile", "LogLevel", "MountScript", "UmountScript", "InitScript", "GetDevicesScript", "Keyfile"]}
     1.6  
     1.7 -#CONFIG_FILE="/etc/enryptionprovider/encryptionprovider.cfg"
     1.8 +#CONFIG_FILE="/etc/encryptionprovider/encryptionprovider.cfg"
     1.9  CONFIG_FILE="/home/spawn/workspace_python/encryptionprovider/config/encryptionprovider.cfg"
    1.10  CONFIG_NOT_READABLE = "Configfile is not readable"
    1.11  CONFIG_WRONG = "Something is wrong with the config"
    1.12 @@ -139,9 +139,9 @@
    1.13      
    1.14      parser = argparse.ArgumentParser(epilog='--mount, --umount and --initialize are mutually exclusive')
    1.15      group = parser.add_mutually_exclusive_group(required=True)
    1.16 -    group.add_argument('-m', '--mount', action='store', nargs=4, dest='mount', help='Mounts an encrypted device.', metavar=("interface", "port", "device", "mountpoint"))
    1.17 -    group.add_argument('-u', '--umount', action='store', nargs=1, dest='umount', help='Unmounts an encrypted device', metavar="device")
    1.18 -    group.add_argument('-i', '--initialize', action='store', nargs=4, dest='initialize', help='Initialize an device.', metavar=("interface", "port", "device", "mountpoint"))
    1.19 +    group.add_argument('-m', '--mount', action='store', nargs=4, dest='mount', help='Mounts an encrypted device.', metavar=("interface", "port", "tcfile", "mountpoint"))
    1.20 +    group.add_argument('-u', '--umount', action='store', nargs=1, dest='umount', help='Unmounts an encrypted device', metavar="tcfile")
    1.21 +    group.add_argument('-i', '--initialize', action='store', nargs=4, dest='initialize', help='Initialize an device.', metavar=("interface", "port", "tcfile", "mountpoint"))
    1.22      group.add_argument('-g', '--getdevices', action='store_true', dest="getdevices", help='Returns a list of all mounted encrypted devices')
    1.23      arguments = parser.parse_args()
    1.24