X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fdird%2Fua_dotcmds.c;h=ef777e207825e1c9c55ce10e1057e39717774c42;hb=730033d0e792e8edab6746fddfbee42b1a2345ba;hp=fd2dfdef28bd916f7493953987d1be36465f0bce;hpb=0c67599861b10752d85f5150e2d5a8e12f2768c6;p=bacula%2Fbacula diff --git a/bacula/src/dird/ua_dotcmds.c b/bacula/src/dird/ua_dotcmds.c index fd2dfdef28..ef777e2078 100644 --- a/bacula/src/dird/ua_dotcmds.c +++ b/bacula/src/dird/ua_dotcmds.c @@ -69,6 +69,7 @@ static bool volstatuscmd(UAContext *ua, const char *cmd); static bool mediatypescmd(UAContext *ua, const char *cmd); static bool locationscmd(UAContext *ua, const char *cmd); static bool mediacmd(UAContext *ua, const char *cmd); +static bool aopcmd(UAContext *ua, const char *cmd); static bool dot_bvfs_lsdirs(UAContext *ua, const char *cmd); static bool dot_bvfs_lsfiles(UAContext *ua, const char *cmd); @@ -102,6 +103,7 @@ static struct cmdstruct commands[] = { /* help */ /* can be used in runscript * { NT_(".media"), mediacmd, NULL, true}, { NT_(".mediatypes"), mediatypescmd, NULL, true}, { NT_(".locations"), locationscmd, NULL, true}, + { NT_(".actiononpurge"),aopcmd, NULL, true}, { NT_(".bvfs_lsdirs"), dot_bvfs_lsdirs, NULL, true}, { NT_(".bvfs_lsfiles"),dot_bvfs_lsfiles,NULL, true}, { NT_(".bvfs_update"), dot_bvfs_update, NULL, true}, @@ -585,6 +587,12 @@ static bool storagecmd(UAContext *ua, const char *cmd) return true; } +static bool aopcmd(UAContext *ua, const char *cmd) +{ + ua->send_msg("None\n"); + ua->send_msg("Truncate\n"); + return true; +} static bool typescmd(UAContext *ua, const char *cmd) { @@ -596,7 +604,6 @@ static bool typescmd(UAContext *ua, const char *cmd) return true; } - /* * If this command is called, it tells the director that we * are a program that wants a sort of API, and hence,