fix defect 4117 and 4113
This commit is contained in:
parent
ed76d20ea9
commit
961d68cd85
@ -279,7 +279,7 @@ __EOF__
|
||||
cat << '__EOF__' > mklocalrepo.sh
|
||||
. /etc/lsb-release
|
||||
cd `dirname $0`
|
||||
echo deb file://"`pwd`" $DISTRIB_CODENAME main > /etc/apt/sources.list.d/xcat-core.list
|
||||
echo deb [arch=amd64] file://"`pwd`" $DISTRIB_CODENAME main > /etc/apt/sources.list.d/xcat-core.list
|
||||
__EOF__
|
||||
|
||||
chmod 775 mklocalrepo.sh
|
||||
@ -380,7 +380,7 @@ __EOF__
|
||||
cat << '__EOF__' > mklocalrepo.sh
|
||||
. /etc/lsb-release
|
||||
cd `dirname $0`
|
||||
echo deb file://"`pwd`" $DISTRIB_CODENAME main > /etc/apt/sources.list.d/xcat-dep.list
|
||||
echo deb [arch=amd64] file://"`pwd`" $DISTRIB_CODENAME main > /etc/apt/sources.list.d/xcat-dep.list
|
||||
__EOF__
|
||||
|
||||
chmod 775 mklocalrepo.sh
|
||||
|
@ -884,10 +884,15 @@ sub check_options
|
||||
# if not help and not -n, dhcpd needs to be running
|
||||
if (!($opt->{h})&& (!($opt->{n}))) {
|
||||
if (xCAT::Utils->isLinux()) {
|
||||
my @output = xCAT::Utils->runcmd("service dhcpd status", -1);
|
||||
my $DHCPSERVER="dhcpd";
|
||||
if( -e "/etc/init.d/isc-dhcp-server" ){
|
||||
$DHCPSERVER="isc-dhcp-server";
|
||||
}
|
||||
|
||||
my @output = xCAT::Utils->runcmd("service $DHCPSERVER status", -1);
|
||||
if ($::RUNCMD_RC != 0) { # not running
|
||||
my $rsp = {};
|
||||
$rsp->{data}->[0] = "dhcpd is not running. Run service dhcpd start and rerun your command.";
|
||||
$rsp->{data}->[0] = "$DHCPSERVER is not running. Run service $DHCPSERVER start and rerun your command.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback, 1);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user