forked from Mirror/pmbootstrap
* Allow to specify a custom username in "pmbootstrap init" * Build chroots have "pmos" instead of "user" as username now * Installation user UID is 1000 now (as in all other Linux distributions) * Adjust autologins * postmarketos-base: enable wheel group for sudo, removed previous sudoers file * Implement safe upgrade path: We save the version of the work folder format now, in $WORK/version. When this file does not exist, it defaults to 0. In case it does not match the currently required version (pmb.config.work_version), then ask the user if it should automatically be upgraded.
This commit is contained in:
parent
75210b5cb5
commit
b4dd7a89d2
45 changed files with 229 additions and 106 deletions
|
@ -29,7 +29,7 @@ def get_running_pid(args):
|
|||
"""
|
||||
:returns: the running distccd's pid as integer or None
|
||||
"""
|
||||
pidfile = args.work + "/chroot_native/home/user/distccd.pid"
|
||||
pidfile = args.work + "/chroot_native/home/pmos/distccd.pid"
|
||||
if not os.path.exists(pidfile):
|
||||
return None
|
||||
with open(pidfile, "r") as handle:
|
||||
|
@ -74,7 +74,7 @@ def is_running(args):
|
|||
os.kill(pid, 0)
|
||||
except OSError as err:
|
||||
if err.errno == errno.ESRCH: # no such process
|
||||
pmb.chroot.root(args, ["rm", "/home/user/distccd.pid"])
|
||||
pmb.chroot.root(args, ["rm", "/home/pmos/distccd.pid"])
|
||||
return False
|
||||
elif err.errno == errno.EPERM: # access denied
|
||||
return get_running_info(args)
|
||||
|
@ -88,11 +88,11 @@ def generate_cmdline(args, arch):
|
|||
path = "/usr/lib/gcc-cross-wrappers/" + arch + "/bin:" + pmb.config.chroot_path
|
||||
ret = ["PATH=" + path,
|
||||
"distccd",
|
||||
"--pid-file", "/home/user/distccd.pid",
|
||||
"--pid-file", "/home/pmos/distccd.pid",
|
||||
"--listen", "127.0.0.1",
|
||||
"--allow", "127.0.0.1",
|
||||
"--port", args.port_distccd,
|
||||
"--log-file", "/home/user/distccd.log",
|
||||
"--log-file", "/home/pmos/distccd.log",
|
||||
"--jobs", args.jobs,
|
||||
"--nice", "19",
|
||||
"--job-lifetime", "60",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue