Ryan Novosielski <novosirj <at> umdnj.edu> writes: > > > Ralf Gross wrote: > > Ryan Novosielski schrieb: > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> Ralf Gross wrote: > >>> Ryan Novosielski schrieb: > >>>> Could someone tell me where I'm going wrong here? Here is my line that > >>>> I've added to the config files, stolen directly from those who know what > >>>> they're doing: > >>>> > >>>> Alert Command = "sh -c '/opt/csw/sbin/smartctl -H -l error %c'" > >>> Try something like this: > >>> > >>> Alert Command = "sh -c 'smartctl -H -d scsi -l error %c'" > >> I'll certainly give it a shot, but doesn't it look like the %c is never > >> getting expanded to anything? Does anyone know where in the manual these > >> % variables are discussed? > > > > It's in 'CHAPTER 28. AUTOCHANGER SUPPORT' > > ... > > %c = changer device name > > ... > > > > Of course you can use the device path instead of %c. > > I don't have an autochanger. Would that mean I'd have to type the path > in manually, or use a different variable? > You've got to solutions: 1/ The answer is in the manual too: 'Chapter 14: Alert Command' (bottom of page 228 of bacula.pdf v2.0.3): "you will need to specify a Changer Device directive in your Device resource (...) so that the generic SCSI device name can be edited into the command (with the %c)."
2/ The second one, more elegant, as you do not have to define a ChangerDevice= directive for a device that is not an autochanger, is to modify the AlertCommand= and replace the '%c' with '%a' that is the subtitution for the archive device name (as stated in the manual (chapter 28.5 bottom of page 409 and other places as well). This way Bacula will substitute '%a' with the actual value of the ArchiveDevice= directive in your SD.conf file before it is sent to the OS for execution. > -- > ---- _ _ _ _ ___ _ _ _ > |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer III > |$&| |__| | | |__/ | \| _| |novosirj <at> umdnj.edu - 973/972.0922 (2-0922) > \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630 > > Attachment (novosirj.vcf): text/x-vcard, 306 bytes > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > Bacula-users mailing list > Bacula-users <at> lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users