Merge branch 'master' into 'master'

Debian/Devuan issues on init system detection

- Devuan GNU/Linux uses sysvinit by default but can also use upstart
- Debian GNU/Linux uses systemd by default but can also use sysvinit or upstart
- Devuan GNU/Linux isn't supported in runit recipe for init

For this reason with the old way to detect based on distro/version mapping gitlab-ctl reconfigure will fail and stall in an infinite loop when
installing on Devuan or Debian with a non-default init system installed ( a legit config supported by both Devuan and Debian ).

For this reason i propose a better test to detect the currently configure init by checking /sbin/init file.

This merge request also add support for Devuan in runit recipe for init.

See merge request !338
This commit is contained in:
Marin Jankovski 2015-05-01 10:52:33 +00:00
commit 7dd0234c19
2 changed files with 18 additions and 4 deletions

View File

@ -6,6 +6,8 @@ omnibus-gitlab repository.
7.11.0
- Use a different mirror for libossp-uuid (DJ Mountney) 7f46d70855a4d97eb2b833fc2d120ddfc514dfd4
- try to better detect init system in use on debian derived (nextime) c7bdee17a9927c57e72b41494110b50c7098f42f
- Devuan support added in runit (nextime) ae62a5938a84f5c96d1aeae8d893191eec3586b6
7.10.0

View File

@ -20,11 +20,23 @@
case node["platform_family"]
when "debian"
case node["platform"]
when "debian", "raspbian"
if node["platform_version"] =~ /^8/
include_recipe "runit::systemd"
when "debian", "raspbian", "devuan"
if File.exist?("/sbin/init")
if File.symlink?("/sbin/init")
if File.basename(File.readlink("/sbin/init")) == "systemd"
include_recipe "runit::systemd"
else
include_recipe "runit::upstart"
end
else
include_recipe "runit::sysvinit"
end
else
include_recipe "runit::sysvinit"
if node["platform_version"] =~ /^8/
include_recipe "runit::systemd"
else
include_recipe "runit::sysvinit"
end
end
else
include_recipe "runit::upstart"