]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_dotcmds.c
Add .actiononpurge command
[bacula/bacula] / bacula / src / dird / ua_dotcmds.c
index fd2dfdef28bd916f7493953987d1be36465f0bce..ef777e207825e1c9c55ce10e1057e39717774c42 100644 (file)
@@ -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,