/[pxelator]/bin/tftpd.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /bin/tftpd.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 17 by dpavlin, Tue Jul 28 10:29:33 2009 UTC revision 24 by dpavlin, Tue Jul 28 21:03:29 2009 UTC
# Line 5  use Net::TFTPd 0.03 qw(%OPCODES); Line 5  use Net::TFTPd 0.03 qw(%OPCODES);
5    
6  die "need to run $0 as root like this\nsudo $0\n" unless $< == 0;  die "need to run $0 as root like this\nsudo $0\n" unless $< == 0;
7    
8    our $tftp_dir;
9  sub tftp_dir {  sub tftp_dir {
10          my $dir = 'conf/' . readlink('conf/tftp.dir');          require 'config.pl';
11          $dir =~ s{[^/]+/\.\./([^/]+)}{$1};          warn "# config: ", readlink 'config.pl', " tftp_dir: $tftp_dir\n";
12          return $dir;          return $tftp_dir;
13  }  }
14    
15  my $tftp_dir = tftp_dir;  tftp_dir;
16    
17  die "no $tftp_dir\n" unless -e $tftp_dir;  die "no $tftp_dir\n" unless -e $tftp_dir;
18    

Legend:
Removed from v.17  
changed lines
  Added in v.24

  ViewVC Help
Powered by ViewVC 1.1.26