Merge "check dnsmasq exists before kill dnsmasq service" into dev/experimental

This commit is contained in:
Jenkins 2015-02-05 21:28:50 +00:00 committed by Gerrit Code Review
commit dcf7292e79
3 changed files with 13 additions and 9 deletions

View File

@ -159,15 +159,17 @@ echo "disable selinux temporarily"
echo 0 > /selinux/enforce echo 0 > /selinux/enforce
# make log dir # make log dir
mkdir -p /var/log/cobbler sudo mkdir -p /var/log/cobbler
mkdir -p /var/log/cobbler/tasks sudo mkdir -p /var/log/cobbler/tasks
mkdir -p /var/log/cobbler/anamon sudo mkdir -p /var/log/cobbler/anamon
chmod -R 777 /var/log/cobbler sudo chmod -R 777 /var/log/cobbler
# kill dnsmasq service # kill dnsmasq service
chkconfig dnsmasq off if `sudo chkconfig --list dnsmasq`; then
service dnsmasq stop sudo chkconfig dnsmasq off
killall -9 dnsmasq sudo service dnsmasq stop
fi
sudo killall -9 dnsmasq
sudo service httpd restart sudo service httpd restart
sudo service cobblerd restart sudo service cobblerd restart

View File

@ -52,4 +52,6 @@ sudo chkconfig redis on
sudo chkconfig mysqld on sudo chkconfig mysqld on
sudo chkconfig iptables off sudo chkconfig iptables off
sudo chkconfig ip6tables off sudo chkconfig ip6tables off
sudo chkconfig dnsmasq off if `sudo chkconfig --list dnsmasq`; then
sudo chkconfig dnsmasq off
fi

View File

@ -205,7 +205,7 @@ download()
fi fi
fi fi
if [[ "$url" =~ (http|https|ftp):// ]]; then if [[ "$url" =~ (http|https|ftp):// ]]; then
echo "downloading $url to /tmp/${package}" echo "download $url to /tmp/${package}"
if [[ -f /tmp/${package} || -L /tmp/${package} ]]; then if [[ -f /tmp/${package} || -L /tmp/${package} ]]; then
curl -f -L -z /tmp/${package} -o /tmp/${package}.tmp $url curl -f -L -z /tmp/${package} -o /tmp/${package}.tmp $url
else else