mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 8253: get_password_from_domr is a part of source code now. It should be located under /usr/bin/ directory on the Management server once cloudstack software is installed
status 8253: resolved fixed
This commit is contained in:
parent
d5bded3d6d
commit
ff281af035
@ -506,6 +506,7 @@ fi
|
|||||||
%files setup
|
%files setup
|
||||||
%attr(0755,root,root) %{_bindir}/%{name}-setup-databases
|
%attr(0755,root,root) %{_bindir}/%{name}-setup-databases
|
||||||
%attr(0755,root,root) %{_bindir}/%{name}-migrate-databases
|
%attr(0755,root,root) %{_bindir}/%{name}-migrate-databases
|
||||||
|
%attr(0755,root,root) %{_bindir}/get_password_from_domr
|
||||||
%dir %{_datadir}/%{name}/setup
|
%dir %{_datadir}/%{name}/setup
|
||||||
%{_datadir}/%{name}/setup/*.sql
|
%{_datadir}/%{name}/setup/*.sql
|
||||||
%{_datadir}/%{name}/setup/deploy-db-dev.sh
|
%{_datadir}/%{name}/setup/deploy-db-dev.sh
|
||||||
|
|||||||
1
debian/cloud-setup.install
vendored
1
debian/cloud-setup.install
vendored
@ -1,5 +1,6 @@
|
|||||||
/usr/bin/cloud-setup-databases
|
/usr/bin/cloud-setup-databases
|
||||||
/usr/bin/cloud-migrate-databases
|
/usr/bin/cloud-migrate-databases
|
||||||
|
/usr/bin/get_password_from_domr
|
||||||
/usr/share/cloud/setup/*.sql
|
/usr/share/cloud/setup/*.sql
|
||||||
/usr/share/cloud/setup/deploy-db-dev.sh
|
/usr/share/cloud/setup/deploy-db-dev.sh
|
||||||
/usr/share/cloud/setup/server-setup.xml
|
/usr/share/cloud/setup/server-setup.xml
|
||||||
|
|||||||
@ -37,7 +37,7 @@ do
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
request=$(echo $input | grep "VM Request:" | cut -d: -f2 | sed 's/^[ \t]*//')
|
request=$(echo $input | grep "VM_Request:" | cut -d: -f2 | sed 's/^[ \t]*//')
|
||||||
|
|
||||||
if [ "$request" != "" ]
|
if [ "$request" != "" ]
|
||||||
then
|
then
|
||||||
|
|||||||
@ -32,7 +32,6 @@ import java.security.MessageDigest;
|
|||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
@ -44,7 +43,6 @@ import javax.crypto.SecretKey;
|
|||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import com.cloud.agent.api.routing.NetworkElementCommand;
|
|
||||||
import com.cloud.configuration.Config;
|
import com.cloud.configuration.Config;
|
||||||
import com.cloud.configuration.ConfigurationVO;
|
import com.cloud.configuration.ConfigurationVO;
|
||||||
import com.cloud.configuration.dao.ConfigurationDao;
|
import com.cloud.configuration.dao.ConfigurationDao;
|
||||||
@ -59,8 +57,6 @@ import com.cloud.domain.DomainVO;
|
|||||||
import com.cloud.domain.dao.DomainDao;
|
import com.cloud.domain.dao.DomainDao;
|
||||||
import com.cloud.exception.InternalErrorException;
|
import com.cloud.exception.InternalErrorException;
|
||||||
import com.cloud.exception.InvalidParameterValueException;
|
import com.cloud.exception.InvalidParameterValueException;
|
||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
|
||||||
import com.cloud.network.IPAddressVO;
|
|
||||||
import com.cloud.network.Network;
|
import com.cloud.network.Network;
|
||||||
import com.cloud.network.Network.State;
|
import com.cloud.network.Network.State;
|
||||||
import com.cloud.network.NetworkVO;
|
import com.cloud.network.NetworkVO;
|
||||||
@ -83,7 +79,6 @@ import com.cloud.storage.DiskOfferingVO;
|
|||||||
import com.cloud.storage.SnapshotPolicyVO;
|
import com.cloud.storage.SnapshotPolicyVO;
|
||||||
import com.cloud.storage.dao.DiskOfferingDao;
|
import com.cloud.storage.dao.DiskOfferingDao;
|
||||||
import com.cloud.storage.dao.SnapshotPolicyDao;
|
import com.cloud.storage.dao.SnapshotPolicyDao;
|
||||||
import com.cloud.test.DatabaseConfig;
|
|
||||||
import com.cloud.test.IPRangeConfig;
|
import com.cloud.test.IPRangeConfig;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
import com.cloud.user.User;
|
import com.cloud.user.User;
|
||||||
|
|||||||
46
setup/bindir/get_password_from_domr.in
Executable file
46
setup/bindir/get_password_from_domr.in
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Init file for Password Download Client
|
||||||
|
#
|
||||||
|
# chkconfig: 345 98 02
|
||||||
|
# description: Password Download Client
|
||||||
|
|
||||||
|
# Modify this line to specify the user (default is root)
|
||||||
|
user=root
|
||||||
|
|
||||||
|
# Add your DHCP lease file here
|
||||||
|
DHCP_FILES="/var/lib/dhclient/dhclient-eth0.leases /var/lib/dhcp3/dhclient.eth0.leases"
|
||||||
|
|
||||||
|
for DHCP_FILE in $DHCP_FILES
|
||||||
|
do
|
||||||
|
if [ -f $DHCP_FILE ]
|
||||||
|
then
|
||||||
|
DOMR_IP=$(grep dhcp-server-identifier $DHCP_FILE | tail -1 | awk '{print $NF}' | tr -d '\;')
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
password=$(wget -t 3 -T 20 -O - --header "VM_Request: send_my_password" $DOMR_IP:8080)
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
password=$(echo $password | tr -d '\r')
|
||||||
|
|
||||||
|
if [ -n "$password" ] && [ "$password" != "bad_request" ] && [ "$password" != "saved_password" ]
|
||||||
|
then
|
||||||
|
echo $password | passwd --stdin $user
|
||||||
|
if [ $? -gt 0 ]
|
||||||
|
then
|
||||||
|
usermod -p `mkpasswd $password 42` $user
|
||||||
|
if [ $? -gt 0 ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
wget -t 3 -T 20 -O - --header "VM_Request: saved_password" $DOMR_IP:8080
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
Loading…
x
Reference in New Issue
Block a user