1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-23 12:35:12 +03:00
pmbootstrap/pmbootstrap.py
Casey Connolly c0595b0437
pass in original UID
detect running as root before entering the user namespace.

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
2025-05-30 13:23:00 +02:00

15 lines
440 B
Python
Executable file

#!/usr/bin/env python3
# -*- encoding: UTF-8 -*-
# Copyright 2023 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later
# PYTHON_ARGCOMPLETE_OK
import sys
import pmb
import os
original_uid = os.geteuid()
# A convenience wrapper for running pmbootstrap from the git repository. This
# script is not part of the python packaging, so don't add more logic here!
if __name__ == "__main__":
sys.exit(pmb.main(original_uid=original_uid))