mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
Fixed some bugs
This commit is contained in:
parent
fafce78e68
commit
871e04fb03
4 changed files with 32 additions and 15 deletions
|
@ -43,19 +43,19 @@
|
||||||
<h3 class="page-header">{% trans "Edit Password" %}</h3>
|
<h3 class="page-header">{% trans "Edit Password" %}</h3>
|
||||||
<form class="form-horizontal" method="post" action="" role="form">{% csrf_token %}
|
<form class="form-horizontal" method="post" action="" role="form">{% csrf_token %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label">{% trans "Old password" %}</label>
|
<label class="col-sm-2 control-label">{% trans "Old" %}</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input type="password" class="form-control" name="oldpasswd" value="">
|
<input type="password" class="form-control" name="oldpasswd" value="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group bridge_name_form_group_dhcp">
|
<div class="form-group bridge_name_form_group_dhcp">
|
||||||
<label class="col-sm-2 control-label">{% trans "New password" %}</label>
|
<label class="col-sm-2 control-label">{% trans "New" %}</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input type="password" class="form-control" name="passwd1" value="">
|
<input type="password" class="form-control" name="passwd1" value="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group bridge_name_form_group_dhcp">
|
<div class="form-group bridge_name_form_group_dhcp">
|
||||||
<label class="col-sm-2 control-label">{% trans "Retry password" %}</label>
|
<label class="col-sm-2 control-label">{% trans "Retry" %}</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input type="password" class="form-control" name="passwd2" value="">
|
<input type="password" class="form-control" name="passwd2" value="">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -66,14 +66,15 @@ parser.add_option("-c",
|
||||||
|
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
FORMAT="%(asctime)s - %(name)s - %(levelname)s : %(message)s"
|
|
||||||
|
FORMAT = "%(asctime)s - %(name)s - %(levelname)s : %(message)s"
|
||||||
if options.debug:
|
if options.debug:
|
||||||
logging.basicConfig(level=logging.DEBUG,format=FORMAT)
|
logging.basicConfig(level=logging.DEBUG, format=FORMAT)
|
||||||
options.verbose=True
|
options.verbose = True
|
||||||
elif options.verbose:
|
elif options.verbose:
|
||||||
logging.basicConfig(level=logging.INFO,format=FORMAT)
|
logging.basicConfig(level=logging.INFO, format=FORMAT)
|
||||||
else:
|
else:
|
||||||
logging.basicConfig(level=logging.WARNING,format=FORMAT)
|
logging.basicConfig(level=logging.WARNING, format=FORMAT)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from websockify import WebSocketProxy
|
from websockify import WebSocketProxy
|
||||||
|
|
|
@ -588,10 +588,21 @@ install_debian() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_debian_post() {
|
install_debian_post() {
|
||||||
if [ -f /etc/default/libvirt-bin ]; then
|
if [ $DISTRO_MAJOR_VERSION -ge 8 ]; then
|
||||||
sed -i 's/libvirtd_opts="-d"/libvirtd_opts="-d -l"/g' /etc/default/libvirt-bin
|
LIBVIRTSVC=libvirtd
|
||||||
else
|
else
|
||||||
echoerror "/etc/default/libvirt-bin not found. Exiting..."
|
LIBVIRTSVC=libvirt-bin
|
||||||
|
fi
|
||||||
|
if [ -f /etc/default/$LIBVIRTSVC ]; then
|
||||||
|
if [ "$( grep -c '^libvirtd_opts *=' /etc/default/$LIBVIRTSVC )" -gt 0 ]; then
|
||||||
|
if [ $( grep -c '^libvirtd_opts *=.*-l' /etc/default/$LIBVIRTSVC ) -eq 0 ]; then
|
||||||
|
sed -i 's/^libvirtd_opts="\([^"]*\)"/libvirtd_opts="\1 -l"/g' /etc/default/$LIBVIRTSVC
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
sed -i 's/^#libvirtd_opts=.*$/libvirtd_opts="-l"/g' /etc/default/$LIBVIRTSVC
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echoerror "/etc/default/$LIBVIRTSVC not found. Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ -f /etc/libvirt/libvirtd.conf ]; then
|
if [ -f /etc/libvirt/libvirtd.conf ]; then
|
||||||
|
@ -612,9 +623,14 @@ install_debian_post() {
|
||||||
}
|
}
|
||||||
|
|
||||||
daemons_running_debian() {
|
daemons_running_debian() {
|
||||||
if [ -f /etc/init.d/libvirt-bin ]; then
|
if [ $DISTRO_MAJOR_VERSION -ge 8 ]; then
|
||||||
/etc/init.d/libvirt-bin stop > /dev/null 2>&1
|
LIBVIRTSVC=libvirtd
|
||||||
/etc/init.d/libvirt-bin start
|
else
|
||||||
|
LIBVIRTSVC=libvirt-bin
|
||||||
|
fi
|
||||||
|
if [ -f /etc/init.d/$LIBVIRTSVC ]; then
|
||||||
|
/etc/init.d/$LIBVIRTSVC stop > /dev/null 2>&1
|
||||||
|
/etc/init.d/$LIBVIRTSVC start
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<h4 class="modal-title">{% trans "Chose computes for new instance" %}</h4>
|
<h4 class="modal-title">{% trans "Choose a compute for new instance" %}</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form class="form-horizontal" role="form">
|
<form class="form-horizontal" role="form">
|
||||||
|
|
Loading…
Reference in a new issue