--- bin/tftpd.pl 2009/07/28 10:29:33 17 +++ bin/tftpd.pl 2009/07/28 21:03:29 24 @@ -5,13 +5,14 @@ die "need to run $0 as root like this\nsudo $0\n" unless $< == 0; +our $tftp_dir; sub tftp_dir { - my $dir = 'conf/' . readlink('conf/tftp.dir'); - $dir =~ s{[^/]+/\.\./([^/]+)}{$1}; - return $dir; + require 'config.pl'; + warn "# config: ", readlink 'config.pl', " tftp_dir: $tftp_dir\n"; + return $tftp_dir; } -my $tftp_dir = tftp_dir; +tftp_dir; die "no $tftp_dir\n" unless -e $tftp_dir;