# Default to system distribution
self.distro = distro or system.distro
- # Check if we are operating as the root user
- self.check_root_user()
-
# check if we are actually running on an ipfire system
if self.path == "/":
self.check_is_ipfire()
for repo in self.repos:
repo.refresh(force=force)
- def check_root_user(self):
- if not os.getuid() == 0 or not os.getgid() == 0:
- raise Exception("You must run pakfire as the root user.")
-
def check_is_ipfire(self):
ret = os.path.exists("/etc/ipfire-release")