nt_export_djb.pl has hardcoded location for tinydns-data

Started by monachus, June 19, 2009, 03:25:25 AM

Previous topic - Next topic

monachus

On line 353 of nt_export_djb.pl the location of the tinydns-data script is hardcoded to /usr/local/bin.  This should be a configurable option, perhaps a variable at the top of the file, a parameter with a default, or else some logic to find the binary itself.  At the very least, it should test that the binary exists before calling it and exit gracefully (with a nice error) - not with the error that tinydns-data exited with some arbitrary and non-useful error code.

my $djb_error = system("/usr/local/bin/tinydns-data");
Adrian Goins - President / CEO
Arces Network, LLC
http://www.arces.net

PGP Key: 1024D/8AADA4B8 2009-04-20
Fingerprint: E3CD 96EA DF3F B345 7ADB  FB74 31EC 9F54 8AAD A4B8

matt

-    my $djb_error = system("/usr/local/bin/tinydns-data");
+    my $tinydata = '/usr/local/bin/tinydns-data';
+    $tinydata = '/usr/bin/tinydns-data' if ! -x $tinydata;
+    die "unable to find tinydns-data" if ! -x $tinydata;
+    my $djb_error = system($tinydata);