add new content type 'snippets'

will be used to contain files which can be executed as hookscripts or
contain custom cloud-init configs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2019-01-29 16:28:38 +01:00
committed by Thomas Lamprecht
parent 931c35cfa0
commit 7c7ae12f43
2 changed files with 49 additions and 2 deletions

View File

@ -428,6 +428,8 @@ sub parse_volname {
return ('backup', $fn, $2);
}
return ('backup', $fn);
} elsif ($volname =~ m!^snippets/([^/]+)$!) {
return ('snippets', $1);
}
die "unable to parse directory volume name '$volname'\n";
@ -439,6 +441,7 @@ my $vtype_subdirs = {
iso => 'template/iso',
vztmpl => 'template/cache',
backup => 'dump',
snippets => 'snippets',
};
sub get_subdir {