Accepting request 755958 from home:cyphar:lxc

- Support older SLE systems which don't have "usermod -w -v".

OBS-URL: https://build.opensuse.org/request/show/755958
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxd?expand=0&rev=31
This commit is contained in:
Aleksa Sarai 2019-12-12 00:12:45 +00:00 committed by Git OBS Bridge
parent 2f6dbed152
commit 1d0c730a6d
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Dec 11 23:55:40 UTC 2019 - Aleksa Sarai <asarai@suse.com>
- Support older SLE systems which don't have "usermod -w -v".
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 3 01:53:53 UTC 2019 - Aleksa Sarai <asarai@suse.com> Thu Oct 3 01:53:53 UTC 2019 - Aleksa Sarai <asarai@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package lxd # spec file for package lxd
# #
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -326,9 +326,11 @@ touch /etc/subuid /etc/subgid ||:
# This default setting of 500 million is enough for ~8000 isolated containers, # This default setting of 500 million is enough for ~8000 isolated containers,
# which should be enough for most users. # which should be enough for most users.
grep -q '^root:' /etc/subuid || \ grep -q '^root:' /etc/subuid || \
usermod -v 400000000-900000000 root ||: usermod -v 400000000-900000000 root &>/dev/null || \
echo "root:400000000:500000001" >>/etc/subuid ||:
grep -q '^root:' /etc/subgid || \ grep -q '^root:' /etc/subgid || \
usermod -w 400000000-900000000 root ||: usermod -w 400000000-900000000 root &>/dev/null || \
echo "root:400000000:500000001" >>/etc/subgid ||:
%service_add_pre %{name}.service %service_add_pre %{name}.service