diff options
author | Vincent Legoll <vincent.legoll@gmail.com> | 2020-04-13 18:07:40 +0200 |
---|---|---|
committer | Guix Patches Tester <> | 2020-04-14 19:16:30 +0100 |
commit | 9d7f265cfce1fe21e05ba9210bd44e37a5346932 (patch) | |
tree | 7cad652ae24b7c30656d68150b3d00314941ef55 /etc/guix-install.sh | |
parent | 036acbf287309fd11540769879bb0693bbc4e025 (diff) | |
download | patches-9d7f265cfce1fe21e05ba9210bd44e37a5346932.tar patches-9d7f265cfce1fe21e05ba9210bd44e37a5346932.tar.gz |
guix-install.sh, guix-binary tarball: Handle runit-based foreign distributions.series-3526
* .gitignore: Add /etc/runit/run.
* etc/guix-install.sh (chk_init_sys): Add case to detect runit.
(sys_enable_guix_daemon): Add case to setup guix-daemon within runit.
* etc/runit/run.in: New file.
* nix/local.mk (etc/runit/run): Add target to generate etc/runit/run from
etc/runit/run.in. (nodist_runitservice_DATA): New variable... (CLEANFILES):
... add it here. (runitservicedir): New variable. (EXTRA_DIST): Add
etc/runit/run.in.
Diffstat (limited to 'etc/guix-install.sh')
-rwxr-xr-x | etc/guix-install.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 0d15a05cb4..06590ee97f 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -152,6 +152,10 @@ chk_init_sys() _msg "${INF}init system is: sysv-init" INIT_SYS="sysv-init" return 0 + elif [[ -d /etc/sv ]]; then + _msg "${INF}init system is: runit" + INIT_SYS="runit" + return 0 else INIT_SYS="NA" _err "${ERR}Init system could not be detected." @@ -364,6 +368,13 @@ sys_enable_guix_daemon() systemctl enable guix-daemon; } && _msg "${PAS}enabled Guix daemon via systemd" ;; + runit) + { cp -r "${ROOT_HOME}/.config/guix/current/lib/runit/guix-daemon" \ + /etc/sv; + chmod 755 /etc/sv/guix-daemon/run; + ln -s /etc/sv/guix-daemon /etc/runit/runsvdir/default/; } && + _msg "${PAS}enabled Guix daemon via runit" + ;; sysv-init) { mkdir -p /etc/init.d; cp "${ROOT_HOME}/.config/guix/current/etc/init.d/guix-daemon" \ |