Changeset 6887


Ignore:
Timestamp:
Feb 21, 2018, 1:29:36 PM (20 months ago)
Author:
mabarracus
Message:

Apply updates from lliurex-base-files = 16.06.19

Location:
lliurex-detect/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lliurex-detect/trunk/fuentes/debian/changelog

    r4448 r6887  
     1lliurex-detect (1.4.3) xenial; urgency=medium
     2
     3  * Apply updates from lliurex-base-files = 16.06.19
     4
     5 -- M.Angel Juan <m.angel.juan@gmail.com>  Wed, 21 Feb 2018 13:28:42 +0100
     6
    17lliurex-detect (1.4.2) xenial; urgency=medium
    28
  • lliurex-detect/trunk/fuentes/lliurex-detect.install/usr/bin/lliurex-detect

    r4448 r6887  
    1010import sys
    1111import os
     12import codecs
    1213import pwd,grp
    1314import argparse
     
    189190    #grp_info [0]=>name [1]=>pwd [2]=>gid [3]=>member
    190191    grupos = [ group[0] for group in grp.getgrall() if user_name in group[3] ]
    191     with open('/etc/passwd','r') as filepwd:
     192    with codecs.open('/etc/passwd','r','utf-8') as filepwd:
    192193        localusers=[ line.split(':')[0] for line in filepwd.readlines() ]
    193194
     
    218219    need_structure={'pool':[{'main':{'l/lliurex-version-timestamp':('regexp','lliurex-version-timestamp_.*\.deb$')}},'universe','multiverse','preschool','restricted'],
    219220                    'dists':['xenial','xenial-security','xenial-updates']}
    220 
    221     return os.path.isdir(mirror_location) and check_structure(mirror_location,need_structure)
     221    try:
     222        return os.path.isdir(mirror_location) and check_structure(mirror_location,need_structure)
     223    except Exception as e:
     224        # As a guest user, /net isn't accessible somehow. Nontheless, if something goes wrong, we return False anyway
     225        #print(e)
     226        return False
    222227
    223228def check_structure(path_from,child=''):
     
    320325                elif 'CLIENT' in [ x.upper() for x in results ] and 'EDU' in [ x.upper() for x in results ]:
    321326                    result['CLIENT']='yes'
     327                elif 'DESKTOP' in [ x.upper() for x in results ] and 'EDU' in [ x.upper() for x in results ]:
     328                    result['DESKTOP']='yes'
    322329                else:
    323330                    result[res.upper()]='yes'
     
    344351                elif 'CLIENT' in [ x.upper() for x in results ] and 'EDU' in [ x.upper() for x in results ]:
    345352                    res='client'
     353                elif 'DESKTOP' in [ x.upper() for x in results ] and 'EDU' in [ x.upper() for x in results ]:
     354                    res='desktop'
    346355            result.append(res)
    347356    elif action == 'print':
Note: See TracChangeset for help on using the changeset viewer.