]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Add ability to mount and unmount a file device providing it is
authorKern Sibbald <kern@sibbald.com>
Mon, 16 Jul 2007 14:14:13 +0000 (14:14 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 16 Jul 2007 14:14:13 +0000 (14:14 +0000)
     marked as being removable and has the appropriate mount and unmount
     commands defined in the Device resource. This fixes bug #830.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5187 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/dev.h
bacula/src/stored/dircmd.c
bacula/src/version.h
bacula/src/win32/installer/winbacula.nsi
bacula/technotes-2.1

index 37dc0ddc4f930b3418ba724543873b44cae001ca..5babdf67b28e9246981ec44848e1f7bc72aaa447 100644 (file)
@@ -281,6 +281,7 @@ public:
    int is_offline() const { return state & ST_OFFLINE; }
    int is_labeled() const { return state & ST_LABEL; }
    int is_mounted() const { return state & ST_MOUNTED; }
+   int is_unmountable() const { return (is_dvd() || (is_file() && is_removable())); }
    int is_part_spooled() const { return state & ST_PART_SPOOLED; }
    int have_media() const { return state & ST_MEDIA; }
    int is_short_block() const { return state & ST_SHORT; }
index 1c31bf233aade13f452c37dbc7e45daef5a1900a..cb99f95bef94cf7dc2f099c2bd62012eb7955163 100644 (file)
@@ -735,7 +735,7 @@ static bool mount_cmd(JCR *jcr)
                                     "If this is not a blank tape, try unmounting and remounting the Volume.\n"),
                              dev->print_name());
                }
-            } else if (dev->is_dvd()) {
+            } else if (dev->is_unmountable()) {
                if (dev->mount(1)) {
                   bnet_fsend(dir, _("3002 Device %s is mounted.\n"), 
                      dev->print_name());
@@ -785,7 +785,7 @@ static bool unmount_cmd(JCR *jcr)
             if (!dev->is_busy()) {
                unload_autochanger(dcr, -1);          
             }
-            if (dev->is_dvd()) {
+            if (dev->is_unmountable()) {
                if (dev->unmount(0)) {
                   bnet_fsend(dir, _("3002 Device %s unmounted.\n"), 
                      dev->print_name());
@@ -804,7 +804,7 @@ static bool unmount_cmd(JCR *jcr)
                /* ***FIXME**** what is this ????  */
                dev->close();
             }
-            if (dev->is_dvd() && !dev->unmount(0)) {
+            if (dev->is_unmountable() && !dev->unmount(0)) {
                bnet_fsend(dir, _("3907 %s"), dev->bstrerror());
             } else {
                dev->set_blocked(BST_UNMOUNTED_WAITING_FOR_SYSOP);
@@ -835,7 +835,7 @@ static bool unmount_cmd(JCR *jcr)
             if (!unload_autochanger(dcr, -1)) {
                dev->close();
             }
-            if (dev->is_dvd() && !dev->unmount(0)) {
+            if (dev->is_unmountable() && !dev->unmount(0)) {
                bnet_fsend(dir, _("3907 %s"), dev->bstrerror());
             } else {
                bnet_fsend(dir, _("3002 Device %s unmounted.\n"), 
index fea4a0e17c9767ef3469f56ef1957dca2f16a954..c05ba6a53f375e827962ba7a977792bcfb9ed9e6 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.1.27"
-#define BDATE   "14 July 2007"
-#define LSMDATE "14Jul07"
+#define BDATE   "16 July 2007"
+#define LSMDATE "16Jul07"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2007"       /* year for copyright messages in progs */
index 16212737400ff71f27045e8a8de262ce211fba2d..6d232fe90f5a65b03699c5dbe8926fc8fad73ea3 100644 (file)
@@ -944,13 +944,25 @@ Section "Uninstall"
 \r
   ; Check for existing installation\r
   MessageBox MB_YESNO|MB_ICONQUESTION \\r
-  "Would you like to delete the current configuration files and the working state file?" IDNO +7\r
+  "Would you like to delete the current configuration files and the working state file?" IDNO NoDel\r
     Delete /REBOOTOK "$APPDATA\Bacula\*"\r
     Delete /REBOOTOK "$APPDATA\Bacula\Work\*"\r
     Delete /REBOOTOK "$APPDATA\Bacula\Spool\*"\r
+    Delete /REBOOTOK "$PLUGINSDIR\bacula-*.conf"\r
+    Delete /REBOOTOK "$PLUGINSDIR\*console.conf"\r
+    Delete /REBOOTOK "$PLUGINSDIR\*conf.in"\r
+    Delete /REBOOTOK "$PLUGINSDIR\openssl.exe"\r
+    Delete /REBOOTOK "$PLUGINSDIR\libeay32.dll"\r
+    Delete /REBOOTOK "$PLUGINSDIR\ssleay32.dll"\r
+    Delete /REBOOTOK "$PLUGINSDIR\sed.exe"    \r
+    Delete /REBOOTOK "$PLUGINSDIR\pw.txt"     \r
+    Delete /REBOOTOK "$PLUGINSDIR\*.sed" \r
+    Delete /REBOOTOK "$PLUGINSDIR\*.cmd"    \r
+    Delete /REBOOTOK "$PLUGINSDIR\*.sql"    \r
     RMDir "$APPDATA\Bacula\Work"\r
     RMDir "$APPDATA\Bacula\Spool"\r
     RMDir "$APPDATA\Bacula"\r
+NoDel:\r
 \r
   ; remove directories used\r
   RMDir "$INSTDIR\bin"\r
index d5c17e5134106410c895be70b6f0119407b13f99..0f70d18a46de889758708c909cbfa98ec47c4577 100644 (file)
@@ -2,6 +2,9 @@
 
 General:
 16Jul07
+kes  Add ability to mount and unmount a file device providing it is
+     marked as being removable and has the appropriate mount and unmount
+     commands defined in the Device resource. This fixes bug #830.
 kes  When applying a storage override, release all previous storage
      definitions rather than just prepending the new storage.
      This should prevent a good deal of confusion.