From 60c7e23e9c574b38df3f9a8ba04ff72e7a42c233 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 28 Jul 2009 21:03:29 +0000 Subject: [PATCH 1/1] take tftp dir from configuration --- bin/tftpd.pl | 9 +++++---- conf/tftp.dir | 1 - config.pl | 12 +----------- 3 files changed, 6 insertions(+), 16 deletions(-) delete mode 120000 conf/tftp.dir mode change 100644 => 120000 config.pl diff --git a/bin/tftpd.pl b/bin/tftpd.pl index 1a9f22e..ced31e7 100755 --- a/bin/tftpd.pl +++ b/bin/tftpd.pl @@ -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 index b4a583d..0000000 --- a/conf/tftp.dir +++ /dev/null @@ -1 +0,0 @@ -../tftp/debian-netboot \ No newline at end of file diff --git a/config.pl b/config.pl deleted file mode 100644 index 83f1018..0000000 --- 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"; - diff --git a/config.pl b/config.pl new file mode 120000 index 0000000..98c521e --- /dev/null +++ b/config.pl @@ -0,0 +1 @@ +conf/debian-nfs-root/config.pl \ No newline at end of file -- 2.20.1