take tftp dir from configuration
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 28 Jul 2009 21:03:29 +0000 (21:03 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 28 Jul 2009 21:03:29 +0000 (21:03 +0000)
bin/tftpd.pl
conf/tftp.dir [deleted symlink]
config.pl [changed from file to symlink]

index 1a9f22e..ced31e7 100755 (executable)
@@ -5,13 +5,14 @@ use Net::TFTPd 0.03 qw(%OPCODES);
 
 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;
 
diff --git a/conf/tftp.dir b/conf/tftp.dir
deleted file mode 120000 (symlink)
index b4a583d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../tftp/debian-netboot
\ No newline at end of file
deleted file mode 100644 (file)
index 83f1018d500d047ff009bc81ca95b2237216b898..0000000000000000000000000000000000000000
--- a/config.pl
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# $file = 'undionly.kpxe';
-#$file = 'pxelinux.0';
-
-$gpxe_file = 'tinycore/tftp.gpxe';
-#$gpxe_file = "http://$server_ip/pxelator/tinycore/http.gpxe";
-#$gpxe_file = "tinycore/http.gpxe";
-#$gpxe_file = "menu.gpxe";
-#$gpxe_file = "debirf.gpxe";
-#$gpxe_file = "dos.gpxe";
-
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..98c521e03616cdb652fa0ba6243537954bd4a604
--- /dev/null
+++ b/config.pl
@@ -0,0 +1 @@
+conf/debian-nfs-root/config.pl
\ No newline at end of file