From 8fed4c6d8587e4b741764e7f62120ee65c70c184 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Mon, 7 Jan 2013 03:26:25 +0000 Subject: [PATCH] tftp-hcp on debian git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14767 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/AAsn.pm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/AAsn.pm b/xCAT-server/lib/xcat/plugins/AAsn.pm index 96e93200c..70136c042 100644 --- a/xCAT-server/lib/xcat/plugins/AAsn.pm +++ b/xCAT-server/lib/xcat/plugins/AAsn.pm @@ -672,8 +672,8 @@ sub setup_DHCP my $distro = xCAT::Utils->osver(); my $serv = "dhcpd"; - if ( $distro =~ /ubuntu.*/ ){ - $serv = "dhcp3-server"; + if ( $distro =~ /ubuntu.*/i || $distro =~ /debian.*/i ){ + $serv = "isc-dhcp-server"; } my $rc = xCAT::Utils->startService($serv); @@ -800,7 +800,7 @@ sub setup_DNS my $distro = xCAT::Utils->osver(); my $serv = "named"; - if ( $distro =~ /ubuntu.*/ ){ + if ( $distro =~ /ubuntu.*/i || $distro =~ /debian.*/i ){ $serv = "bind9"; } @@ -1398,7 +1398,7 @@ sub enable_TFTPhpa } my $distro = xCAT::Utils->osver(); - if ($distro !~ /ubuntu.*/i){ + if ($distro !~ /ubuntu.*/i && $distro !~ /debian.*/i ){ if (! open (FILE, "message("S", "ERROR: Cannot open /etc/xinetd.d/tftp."); return 1; @@ -1514,6 +1514,14 @@ sub enable_TFTPhpa system("stop tftpd-hpa"); } } + + if ($distro =~ /debian.*/i){ + sleep 1; + my @checkproc=`ps axf|grep -v grep|grep in.tftpd`; + if (@checkproc){ + system("service tftpd-hpa stop"); + } + } my @tftpprocs=`ps axf|grep -v grep|grep in.tftpd`; while (@tftpprocs) { sleep 0.1;