Hi,
I'm having a hard time understanding how to access and extract Amanda
configuration parameters using Amanda::Config in perl scripts with
amanda-3.1. Say I have a "subsection" changer in amanda.conf, defined
as
define changer av48 {
tpchanger "chg-robot:/dev/changer"
changerfile "/opt/amanda/etc/amanda/av48-state"
property "tape-device" "1=tape:/dev/nst1"
property "use-slots" "25-48"
}
Using Amanda::Config.pm as an example I tried:
config_init($CONFIG_INIT_EXPLICIT_NAME, "Config_Name");
$ss = lookup_changer_config("av48");
$slot_range = changer_config_getconf($ss, "use-slots");
but that obviously fails. Notice my lack of perl-fu :)
There seems to be a few typos in the pod for Config.pm btw.
Anybody cares to give me a pointer?
Thanks,
jf