tis-wapt-generate-random-uuid-if-needed icon

tis-wapt-generate-random-uuid-if-needed

Silent install package for tis-wapt-generate-random-uuid-if-needed

0-5

  • package: tis-wapt-generate-random-uuid-if-needed
  • version: 0-5
  • categories: Configuration
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • licence: wapt_public
  • locale: all
  • target_os: all
  • architecture: x64,x86
  • signature_date:
  • size: 7.52 Ko
  • conflicts :

package           : tis-wapt-generate-random-uuid-if-needed
version           : 0-5
architecture      : x64,x86
section           : base
priority          : optional
name              : 
categories        : Configuration
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : The computer will generate a random uuid if needed. Based on the non-unique uuids list provided
depends           : 
conflicts         : tis-generate-new-uuid
maturity          : PROD
locale            : all
target_os         : all
min_wapt_version  : 2.4
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : L'ordinateur génère un uuid aléatoire si nécessaire. Sur la base de la liste des uuids non uniques fournie
description_pl    : W razie potrzeby komputer wygeneruje losowy identyfikator uuid. Na podstawie dostarczonej listy nieunikalnych uuidów
description_de    : Der Computer generiert bei Bedarf eine zufällige uuid. Basierend auf der Liste der nicht eindeutigen uuids
description_es    : El ordenador generará un uuid aleatorio si es necesario. Basándose en la lista de uuids no únicos proporcionada
description_pt    : O computador irá gerar um uuid aleatório, se necessário. Com base na lista de uuids não exclusivos fornecida
description_it    : Se necessario, il computer genera un uuid casuale. In base all'elenco di uuid non univoci fornito
description_nl    : De computer genereert indien nodig een willekeurige uuid. Gebaseerd op de lijst met niet-unieke uuids
description_ru    : При необходимости компьютер сгенерирует случайный uuid. На основе предоставленного списка неуникальных uuid
audit_schedule    : 
editor            : 
keywords          : 
licence           : wapt_public
homepage          : 
package_uuid      : cf42e120-2a97-476b-86e4-807083342774
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 8e6b03d57120ace9015db72d4f395dd84064a86292ae0f505ea946379af26d42
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : oNIGgNUF1eYXU8nNKjuK87jxrp7snKUjvbx668c6+avFTxmYADA0WfiDER5MgI4TXEahdvdCvZfkWj056VKtHN6zCzduirbxxMXUNCZ9pEuwyyclu+rvW7wW2v6zwpzN6Rk4BLSjeT4c81Dymx3snHP7r0k7N3uQ8wPFo2iWvQRCw/BodPtCRAMYUPEeoiKVbWerYMVM02TMd6wmFxEQxACrXTMVm9QOxnJpzJ1FH9FvYt1nVpGm5suyQ7EGyU8tdsCr0y096QMHMw4Ck9W2Fc9HkviCPvy1U97DE0YBemau8aBcE/8bd7gw64KNbr5RxI3YhZpN9BRkj0+A56/Ydw==
signature_date    : 2024-04-26T17:00:42.441523
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes

# -*- coding: utf-8 -*-
from setuphelpers import *

# case-insensitivity
non_unique_uuids = [
    "90218F6F-8B87-8442-8AAD-4A676F39B1F3",
    "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF",
]


def install():
    try:
        try:
            uuid_bios = dmi_info()["System_Information"]["UUID"]
        except:
            uuid_bios = dmi_info()["System_Information"][0]["UUID"]
    except:
        print('This computer probably needs "include_dmi_inventory=1" parameter.')
    print("UUID BIOS: " + uuid_bios)
    uuid_wapt = WAPT.host_uuid
    print("UUID WAPT: " + uuid_wapt)

    if any([True for u in non_unique_uuids if u.lower() == uuid_bios.lower()]):
        new_uuid_wapt = str(WAPT.generate_host_uuid())
        print("New UUID WAPT: " + new_uuid_wapt)
        try:
            WAPT.register_computer()
        except:
            pass
        if get_os_name() == "Windows":
            wapt_get_path = makepath(WAPT.wapt_base_dir, "wapt-get.exe")
            create_onetime_task("restart-waptservice", wapt_get_path, "restart-waptservice", 2)
            print("waptservice will restart in 2mins.")
        else:
            print("waptservice may need to be restarted.")
    elif uuid_wapt.lower().startswith("rnd-") and not any([True for u in non_unique_uuids if u.lower() == uuid_bios.lower()]):
        print(
            'This machine has already generated a random uuid. Based on the non_unique_uuids list provided, it does not seem to be needed. You may want to deploy the "tis-wapt-reset-uuid" package.'
        )
    else:
        print("Based on the non_unique_uuids list provided. This computer does not need to generate a random uuid.")

    # old method
    # if not inifile_hasoption(WAPT.config_filename, "global", "uuid"):
    #     for uuid in bad_uuid:
    #         if uuid == uuid_bios:
    #             WAPT.generate_host_uuid()
    #             print("New uuid in wapt-get.ini : " + inifile_readstring(WAPT.config_filename, "global", "uuid"))
    #             try:
    #                 WAPT.register_computer()
    #             except:
    #                 pass

2c54de305783c0b7ac76a55338cd17cf961cdfac96499f27ef8847d92a075950 : setup.py
8e6b03d57120ace9015db72d4f395dd84064a86292ae0f505ea946379af26d42 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
ef8599e4c06d0b8dad787130f17ef4d33323ef0ad02e2866b2568a7d74f66988 : luti.json
5ecb498b3519077024570b7dcf0f9c30e51a0a56ed3b599495281f9c8ef51429 : WAPT/control