Ubuntu

Comment 6 for bug 645082

Fred Baumgarten (dc6iq) wrote :

Hi Serge !

I am pretty sure it matters. If gawk and mawk are installed the same time, the user has to decide what awk is the default. If he uses mawk as default via /etc/alternatives, /usr/bin/awk points to /etc/alternatives/awk which points to /usr/bin/mawk. If bacula depends on gawk (as quoted in the first line of /etc/bacula/scripts/make_catalog_backup_awk), RunBeforeJob = "/usr/bin/awk -f /etc/bacula/scripts/make_catalog_backup_awk -v cat1=MyCatalog /etc/bacula/bacula-dir.conf" will fail, because the statement in line number 1 is not read.

either way is possible:

RunBeforeJob = "/usr/bin/gawk -f /etc/bacula/scripts/make_catalog_backup_awk -v cat1=MyCatalog /etc/bacula/bacula-dir.conf"

which will use the correct awk, or

RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup_awk -v cat1=MyCatalog /etc/bacula/bacula-dir.conf"

which will use the first line in the script to find the correct awk but requires the executable bit set which is not the case right now. Therefore the right fix would be adding the "g" in solution number 1.

Thanks for your work,

Fred