diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-05-17 14:09:43 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-05-17 15:16:58 +0200 |
commit | eb02ba2d630779c20946bda212be23c714b7ac34 (patch) | |
tree | ba5b907e318c5198e32c2093408d8463f50dd961 | |
parent | a9ca7998f7823373f1da486fb27b95f4e4995239 (diff) | |
download | guix-patches-eb02ba2d630779c20946bda212be23c714b7ac34.tar guix-patches-eb02ba2d630779c20946bda212be23c714b7ac34.tar.gz |
etc: Install mount unit only if it exists.
This follows up on 1a1faa78b0498fbb71f1533beb4b65817c1d3f2a, and avoids
the (non-fatal) error seen in <https://issues.guix.gnu.org/41356>.
/gnu/store will remain writable on new foreign distribution
installations until the next release.
* etc/guix-install.sh (sys_enable_guix_daemon): Check for
‘gnu-store.mount’ presence before trying to cp it.
Update forgotten copyright header.
-rwxr-xr-x | etc/guix-install.sh | 11 | ||||
-rw-r--r-- | nix/local.mk | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh index d252c132fb..bcce1d8869 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -3,7 +3,7 @@ # Copyright © 2017 sharlatan <sharlatanus@gmail.com> # Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> # Copyright © 2018 Efraim Flashner <efraim@flashner.co.il> -# Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> +# Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> # # This file is part of GNU Guix. # @@ -344,9 +344,12 @@ sys_enable_guix_daemon() systemd) { # systemd .mount units must be named after the target directory. # Here we assume a hard-coded name of /gnu/store. - cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/gnu-store.mount" \ - /etc/systemd/system/; - chmod 664 /etc/systemd/system/gnu-store.mount; + # XXX Work around <https://issues.guix.gnu.org/41356> until next release. + if [ -f "${ROOT_HOME}/.config/guix/current/lib/systemd/system/gnu-store.mount" ]; then + cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/gnu-store.mount" \ + /etc/systemd/system/; + chmod 664 /etc/systemd/system/gnu-store.mount; + fi cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/guix-daemon.service" \ /etc/systemd/system/; diff --git a/nix/local.mk b/nix/local.mk index 435fdd389a..dbcdde8b0d 100644 --- a/nix/local.mk +++ b/nix/local.mk @@ -1,6 +1,7 @@ # GNU Guix --- Functional package management for GNU # Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org> # Copyright © 2016 Mathieu Lirzin <mthl@gnu.org> +# Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr> # # This file is part of GNU Guix. # |