package.py 658 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/python
  2. #
  3. # Currently, as in some other LFS based distros, providing an user account for flatpak breaks
  4. # the FUSE and non-sudo installations.
  5. # However, I am leaving this file in the repo just in case.
  6. import os, re
  7. OUR_NAME = "flatpak"
  8. OUR_DESC = "flatpak"
  9. def postInstall(fromVersion, fromRelease, toVersion, toRelease):
  10. try:
  11. os.system("groupadd -r %s" % OUR_NAME)
  12. os.system("useradd -r -g %s -d / -s /bin/false -c %s %s" % (OUR_NAME, OUR_DESC, OUR_NAME))
  13. except:
  14. pass
  15. def postRemove():
  16. try:
  17. os.system("userdel %s" % OUR_NAME)
  18. os.system("groupdel %s" % OUR_NAME)
  19. except:
  20. pass