From: Kern Sibbald Date: Tue, 26 Aug 2008 15:17:43 +0000 (+0000) Subject: Apply patch from Bastian Friedrich that accepts a yes on a X-Git-Tag: Release-3.0.0~1060 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=521a9e6e18c793cfebdc09ce47279d6b4a5b6284;p=bacula%2Fbacula Apply patch from Bastian Friedrich that accepts a yes on a delete volume command line. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7511 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 3007f39241..c042c3a4bf 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -1411,10 +1411,14 @@ static int delete_volume(UAContext *ua) "and all Jobs saved on that volume from the Catalog\n"), mr.VolumeName); - bsnprintf(buf, sizeof(buf), _("Are you sure you want to delete Volume \"%s\"? (yes/no): "), - mr.VolumeName); - if (!get_yesno(ua, buf)) { - return 1; + if (find_arg(ua, "yes") >= 0) { + ua->pint32_val = 1; /* Have "yes" on command line already" */ + } else { + bsnprintf(buf, sizeof(buf), _("Are you sure you want to delete Volume \"%s\"? (yes/no): "), + mr.VolumeName); + if (!get_yesno(ua, buf)) { + return 1; + } } if (ua->pint32_val) { db_delete_media_record(ua->jcr, ua->db, &mr); diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 82ad9bc321..21cb952256 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -33,6 +33,8 @@ separator in console (!$%&'()*+,-/:;<>?[]^`{|}~) General: 26Aug08 +kes Apply patch from Bastian Friedrich that accepts a yes on a + delete volume command line. kes Attempt to fix bug #1128 InChanger flag cleared during Migration job when reading from one autochanger and writing to another. kes Minor tweaks (copyright dates convert to use method instead of bnet).