mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 02:42:16 +03:00
unregister gnome addded
This commit is contained in:
parent
e127cdf369
commit
c5c96998e6
1 changed files with 29 additions and 6 deletions
|
@ -147,15 +147,19 @@ class Registration:
|
|||
self.logger.info("Pardus-gnome.conf exists.")
|
||||
file_gmd3 = open(pardus_gnome_path,'r')
|
||||
file_data = file_gmd3.read()
|
||||
if "# disable-user-list=true" in file_data:
|
||||
self.logger.info("gdm.conf has been found.")
|
||||
file_data = file_data.replace("# disable-user-list=true", "disable-user-list=true")
|
||||
file_gdm3.close()
|
||||
file_gdm3 = open(pardus_gnome_path, 'w')
|
||||
file_gdm3.write(file_data)
|
||||
file_gdm3.close()
|
||||
|
||||
file_data = file_data.replace("# disable-user-list=true", "disable-user-list=true")
|
||||
self.logger.info("gdm.conf has been configured.")
|
||||
else:
|
||||
self.logger.error("disable local user can not found")
|
||||
|
||||
file_gdm3.close()
|
||||
file_gdm3 = open(pardus_gnome_path, 'w')
|
||||
file_gdm3.write(file_data)
|
||||
file_gdm3.close()
|
||||
|
||||
self.logger.info("gdm.conf has been configured.")
|
||||
|
||||
# LDAP registration
|
||||
if self.directory_server == "LDAP":
|
||||
|
@ -362,6 +366,25 @@ class Registration:
|
|||
self.logger.info("99-pardus-xfce.conf exists. Deleting file.")
|
||||
self.util.delete_file(pardus_xfce_path)
|
||||
|
||||
if self.desktop_env == "gnome":
|
||||
pardus_gnome_path = "/etc/gdm3/greeter.dconf-default"
|
||||
if not self.util.is_exist(pardus_gnome_path):
|
||||
self.logger.info("Pardus-gnome.conf does not exist.")
|
||||
|
||||
else:
|
||||
self.logger.info("Pardus-gnome.conf exists.")
|
||||
file_gmd3 = open(pardus_gnome_path,'r')
|
||||
file_data = file_gmd3.read()
|
||||
|
||||
file_data = file_data.replace("disable-user-list=true", "# disable-user-list=true")
|
||||
|
||||
file_gdm3.close()
|
||||
file_gdm3 = open(pardus_gnome_path, 'w')
|
||||
file_gdm3.write(file_data)
|
||||
file_gdm3.close()
|
||||
|
||||
self.logger.info("gdm.conf has been configured.")
|
||||
|
||||
Util.shutdown()
|
||||
except Exception as e:
|
||||
self.logger.error("Error while running purge_and_unregister process.. Error Message " + str(e))
|
||||
|
|
Loading…
Reference in a new issue