Changeset 3686


Ignore:
Timestamp:
Feb 21, 2017, 3:01:22 PM (3 years ago)
Author:
mabarracus
Message:

Fixed blocking bug when installing without unattended option
Increased password generation
New mirror availability checking before showing netinstall options

Location:
llx-netinstall/trunk/fuentes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • llx-netinstall/trunk/fuentes/admin-center-llx-netinstall.install/lliurex-netinstall/src/js/lliurex-netinstall.js

    r3684 r3686  
    160160      var  password=($("#llx_netinstall_setnetinstall_pass").val());
    161161      var  rootpassword=($("#llx_netinstall_setnetinstall_pass_root").val());
     162
    162163      if (self.unattended_netinstall){
    163164        if (! username || !password || !rootpassword){
     
    217218};
    218219
     220LlxNetinstall.prototype.showMirrorUnavailable=function showMirrorUnavailable(){
     221       var self=this;
     222       
     223       msg="<h4>"+self._("llx_netinstall_mirror_unavailable")+"</h4>";
     224       $("#llx_netinstall_config").append(msg);
     225}
     226
    219227LlxNetinstall.prototype.checkMirrorAvailable=function checkMirrorAvailable(){
    220228 
     
    222230   var credentials="";
    223231   var n4dclass="MirrorManager";
    224    var n4dmethod="get_all_configs";
     232   var n4dmethod="is_mirror_available";
    225233   var arglist="";
    226234     
    227235   Utils.n4d(credentials, n4dclass, n4dmethod, arglist, function(response){
    228      if(response.status) self.getNetinstallConfig();
    229      else {self.showMirrorUnavailable();
    230        msg="<h4>"+self._("llx_netinstall_mirror_unavailable")+"</h4>";
    231        $("#llx_netinstall_config").append(msg);
     236     if(response.status){
     237        self.getNetinstallConfig();
     238     } else {
     239        self.showMirrorUnavailable();
    232240     }
    233241   });
  • llx-netinstall/trunk/fuentes/debian/changelog

    r3632 r3686  
     1llx-netinstall (0.59) xenial; urgency=medium
     2
     3  * Fixed blocking bug when installing without unattended option
     4  * Increased password generation
     5  * New mirror availability checking before showing netinstall options
     6
     7 -- M.Angel Juan <m.angel.juan@gmail.com>  Tue, 21 Feb 2017 14:58:32 +0100
     8
    19llx-netinstall (0.58) xenial; urgency=medium
    210
  • llx-netinstall/trunk/fuentes/install.llx-netinstall/usr/share/n4d/python-plugins/NetinstallManager.py

    r3632 r3686  
    99import os
    1010import subprocess
     11import string
     12import random
     13import crypt
     14
    1115class NetinstallManager:
    1216
     
    214218                Writing in presseed username and password
    215219                '''                             
    216                 if not username or not password or not rootpassword:
     220                if status == True and (not username or not password or not rootpassword):
    217221                    return {"status":"false", "msg": "Usernames or Passwords can't be an empty string"}
    218222                try:
     
    226230                        preseed=open(filepath,'w')
    227231                        preseed.write("# LMD Created user account\n")
    228                         salt="sw9.tfRI"                 
    229                         userpassencrypted=crypt.crypt(str(password),"$1$"+salt+"$")
    230                         rootpassencrypted=crypt.crypt(str(rootpassword),"$1$"+salt+"$")
     232                        salt=''.join([random.choice(string.ascii_letters + string.digits) for _ in range(16)])
     233                        userpassencrypted=crypt.crypt(str(password),"$6$"+salt+"$")
     234                        salt=''.join([random.choice(string.ascii_letters + string.digits) for _ in range(16)])
     235                        rootpassencrypted=crypt.crypt(str(rootpassword),"$6$"+salt+"$")
    231236                       
    232237                        if(status==True):
Note: See TracChangeset for help on using the changeset viewer.