diff --git a/lxd.changes b/lxd.changes index f97aaf6..da2612f 100644 --- a/lxd.changes +++ b/lxd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Dec 11 23:55:40 UTC 2019 - Aleksa Sarai + +- Support older SLE systems which don't have "usermod -w -v". + ------------------------------------------------------------------- Thu Oct 3 01:53:53 UTC 2019 - Aleksa Sarai diff --git a/lxd.spec b/lxd.spec index 17c3447..f316a81 100644 --- a/lxd.spec +++ b/lxd.spec @@ -1,7 +1,7 @@ # # 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 # 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, # which should be enough for most users. 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 || \ - usermod -w 400000000-900000000 root ||: + usermod -w 400000000-900000000 root &>/dev/null || \ + echo "root:400000000:500000001" >>/etc/subgid ||: %service_add_pre %{name}.service