X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fbacula%2Ffiles%2Fvolumes-delete-old;h=979e469297ac46bf223fec2d58fc4e54eb7e2525;hb=HEAD;hp=80f2c935bbc7ef5f4304f2a0b5ba336df0031b35;hpb=3661675fcab6a1dab09910456c98f19aaa50b395;p=mirror%2Fdsa-puppet.git diff --git a/modules/bacula/files/volumes-delete-old b/modules/bacula/files/volumes-delete-old index 80f2c935b..979e46929 100755 --- a/modules/bacula/files/volumes-delete-old +++ b/modules/bacula/files/volumes-delete-old @@ -49,6 +49,9 @@ parser.add_argument("-v", "--verbose", dest="verbose", parser.add_argument("-n", "--nodo", dest="nodo", default=False, action="store_true", help="Print to cat rather than bconsole.") +parser.add_argument("-t", "--token", metavar='TOKEN', dest="pool_name_token", + default='bacula', + help="A string token used in pool names.") args = parser.parse_args() if args.db is not None: @@ -130,7 +133,7 @@ if os.path.exists(args.clientlist): for r in cursor.fetchall(): poolname = r['name'] - match = re.match('pool[a-z]*-debian-(.*)', poolname) + match = re.match('pool[a-z]*-%s-(.*)'%(args.pool_name_token, ), poolname) if match is not None: hostname = match.group(1) if hostname not in clients: