Commit Graph

3331 Commits

Author SHA1 Message Date
Natanael Copa
93d600c0a4 force root to be rw before localmount
The original service that pulled in root remount was mtab which
is not part of OpenRC.

This fixes #449.
2021-09-14 11:28:41 -05:00
Aaditya Bagga
6e24d33517 [runit integration] give a bit of time to start the service
Currently, we run sv start immediately after linking the service.
The runsv process may not be up at the moment, as a result of which
openrc will mark the service as stopped, even though it may be brought up
by runit at the next scan.

This is documented in the gentoo wiki:
https://wiki.gentoo.org/wiki/Runit#OpenRC.27s_runit_integration_feature

This PR adds a timeout so that correct process state can be reported.

Before:
 * Starting netdata-runit ...
fail: /run/openrc/sv/netdata: runsv not running
 * Failed to start netdata-runit

After:
 * Starting netdata-runit ...
fail: /run/openrc/sv/netdata: runsv not running
ok: run: /run/openrc/sv/netdata: (pid 9042) 0s

This fixes #253.
2021-09-11 17:20:50 -05:00
Jakub Jirutka
d65e603acd Fix undeclared UT_LINESIZE
Fix the following error:

	broadcast.c:41:21: error: '__UT_LINESIZE' undeclared (first use in this function); did you mean 'UT_LINESIZE'?
	 #define UT_LINESIZE __UT_LINESIZE
                          ^~~~~~~~~~

Constant UT_LINESIZE is defined in <utmp.h> provided by musl.
2021-09-09 22:30:59 -05:00
Sören Tempel
d87f5b2f24 rc-mount: make timeout invocation compatible with busybox timeout
Busybox timeout does not support the `-k` flag. As such, invoking fuser
from do_unmount never worked without this patch. This went unnoticed as
standard error is redirected to /dev/null. This patch fixes this by
simply removing the incompatible `-k` flag.

[Ariadne: the `-k` is redundant anyway, since we are sending the KILL
 signal to begin with.]
2021-09-09 22:57:44 -04:00
Ariadne Conill
25d5de8fd9 fix build under musl 1.2 on 32 bit systems
Since musl 1.2 time_t is a 64 bit value, even on 32 bit systems. A
hotfix for printing the value is simply using PRIu64 from inttypes.h
in the format string.

This fixes #446.
2021-09-09 12:36:25 -05:00
Ariadne Conill
b5cf79f747 fix trailing whitespace in tools/meson_runlevels.sh 2021-09-09 02:14:59 -06:00
artoo
3f098817ef meson: fix symlinks with sysvinit 2021-09-09 00:03:04 +02:00
William Hubbs
a25ccbd8f2 build: install pam files 2021-09-08 15:05:46 -05:00
William Hubbs
8807e954c4 meson: typo fix 2021-09-08 14:47:20 -05:00
William Hubbs
4aa5a89ee0 build: fix sysvinit script installation 2021-09-08 13:28:29 -05:00
William Hubbs
46a0bfedd1 build: fix symlinks 2021-09-08 11:59:38 -05:00
William Hubbs
803aa1c637 version 0.44 2021-09-07 16:16:51 -05:00
William Hubbs
fb186a3867 update ChangeLog 2021-09-07 16:14:08 -05:00
William Hubbs
c9b64b64fa update README 2021-09-07 16:13:35 -05:00
William Hubbs
9cce9f8ce8 news typo fix 2021-09-07 15:59:19 -05:00
William Hubbs
5a41f1ef20 add discussion about removing old build system to NEWS 2021-09-07 14:17:44 -05:00
William Hubbs
6e3afc29f3 update NEWS 2021-09-07 13:31:16 -05:00
William Hubbs
7c29fbd36f build: install bash and zsh completions 2021-09-07 12:45:53 -05:00
William Hubbs
593be166d1 build: fix libexecdir 2021-09-06 18:52:54 -05:00
William Hubbs
ca0270967c tools/meson_final.sh: typo fix 2021-09-06 18:37:11 -05:00
William Hubbs
3a187f88f4 build: typo fix 2021-09-06 16:04:46 -05:00
William Hubbs
f2362cc277 build: add split-usr option 2021-09-06 15:22:28 -05:00
William Hubbs
444e44eb9d build: change root_prefix to rootprefix 2021-09-06 14:30:30 -05:00
William Hubbs
c0f8313164 sync meson build version with makefiles 2021-09-05 20:04:55 -05:00
William Hubbs
d6622a1156 add meson build files
Closes #116.
Closes #171.
Closes #172.
Closes #175.
2021-09-04 16:01:29 -05:00
William Hubbs
92004a2ed6 README: add note about github discussions 2021-09-04 14:23:18 -05:00
Matt Whitlock
5f6d7ac028 supervise-daemon: implement SSD_IONICELEVEL
supervise-daemon was apparently overlooked when support for the
SSD_IONICELEVEL environment variable was added. This commit brings
supervise-daemon up to parity with start-stop-daemon with respect to
this environment variable.
2021-08-17 00:57:47 -04:00
William Hubbs
7cedc4942b update travis ci irc notifications
- move to libera network
- always notify on successful build
2021-08-14 15:05:07 -05:00
William Hubbs
091cd8015f man/supervise-daemon.8: document --pidfile option 2021-08-13 23:08:07 -05:00
Sven Wegener
63955056ec on_ac_power: support multiple power_supply devices in sysfs
Newer devices have multiple power_supply devices in sysfs:

$ grep ^ /sys/class/power_supply/*/type
/sys/class/power_supply/AC/type:Mains
/sys/class/power_supply/BAT0/type:Battery
/sys/class/power_supply/ucsi-source-psy-USBC000:001/type:USB
/sys/class/power_supply/ucsi-source-psy-USBC000:002/type:USB

There are two "USB" Type-C ports than can supply power and both are
aggregated into the "Mains" power supply by the firmware. The "Battery"
also counts as a power supply, but is missing the online attribute.

The -f check with a wildcard pattern results in an error, when multiple
devices are present:

/lib/rc/bin/on_ac_power: line 21: [: too many arguments

When the power_supply class is registered, check for a "Mains" device.

Fixes #427.
2021-08-13 13:38:07 -05:00
Alex Xu
1e975be896 conf.d/hostname: clarify hostname variable usage
https://gitlab.alpinelinux.org/alpine/aports/-/issues/9744

This fixes #433.
2021-08-13 13:13:14 -05:00
kyoreln
18e53f7fed move supervise-daemon out of experimental status
supervise-daemon is no longer experimental so remove the statements to
that affect.

This fixes #434.
2021-08-13 12:46:52 -05:00
William Hubbs
b5e4c2c2db Revert "openrc-init: ignore an empty string in argv[1]"
This reverts commit dec9ef200b.
This check is no longer needed since rc_runlevel_exists() is fixed.

    X-Gentoo-Bug: 803536
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/803536
    Closes: https://github.com/OpenRC/openrc/pull/431
2021-08-13 10:46:57 -05:00
William Hubbs
0a97bad6c9 librc: fix rc_runlevel_exists return for empty string
This function should return false if the runlevel is an empty string.

    X-Gentoo-Bug: 803536
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/803536
    Closes: https://github.com/OpenRC/openrc/pull/431
2021-08-13 10:28:44 -05:00
Mike Gilbert
dec9ef200b openrc-init: ignore an empty string in argv[1]
X-Gentoo-Bug: 803536
X-Gentoo-Bug-URL: https://bugs.gentoo.org/803536
Closes: https://github.com/OpenRC/openrc/pull/431
2021-08-12 15:04:38 -05:00
William Hubbs
7f47539fb1 sh/rc-cgroup.sh: fix case in starting message
X-Gentoo-Bug: 804193
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=804193
2021-08-12 14:23:34 -05:00
William Hubbs
9c7bedca9e sh/rc-cgroup.sh: fix cgroup_cleanup
X-Gentoo-Bug: 804193
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=804193
2021-08-12 14:21:58 -05:00
William Hubbs
1d282ddc80 move the irc channel to the libera network 2021-05-23 16:45:32 -05:00
Lars Wendler
0d86c4903b init.d/modules.in: Avoid loading modules twice in Linux with dash shell
Since commit 6b475ab269, openrc tries to load
modules twice which have been defined in /etc/conf.d/modules via modules=
variable when /bin/sh points to dash shell.
The reason is that when the "modules-load" service was merged into "modules"
service, the "modules" variable name got used in both, load_modules()
function and in Linux_modules() function which both get called when modules
service is started. Although "modules" variable is marked as local in
load_modules(), dash simply ignores this.

Avoid the issue by renaming "modules" variable to "_modules" in
load_modules() function.

This fixes #419.
2021-05-12 18:20:43 -05:00
William Hubbs
791322d7fa checkpath: fix code to walk the directory path
X-Gentoo-Bug: 782808
X-Gentoo-Bug-URL: https://bugs.gentoo.org/782808
2021-04-15 17:40:00 -05:00
William Hubbs
63db2d99e7 checkpath: remove extra slashes from paths
This fixes #418.
2021-04-13 17:13:25 -05:00
William Hubbs
8400e7d302 style fix 2021-04-13 16:29:21 -05:00
William Hubbs
533a8c70b3 cgroup2_set_limits: fix harmless error message
In legacy cgroups mode, we were running `mountinfo -q ""` which was
generating an error message. If we return immediately when
cgroup2_find_path returns an empty value, we avoid this message.
2021-04-04 17:31:49 -05:00
William Hubbs
852a3c86f6 NEWNET.md: fix the title 2021-04-03 15:18:30 -05:00
William Hubbs
b3e8072403 rename README.newnet to a markdown file
All of our documentation is in markdown, so rename this file to be
consistent.
2021-04-03 15:14:35 -05:00
William Hubbs
b7c03dea27 README: convert references to markdown links 2021-04-03 15:13:09 -05:00
William Hubbs
ee05403c50 version 0.43 2021-04-02 12:47:39 -05:00
William Hubbs
c1558abb0f update ChangeLog 2021-04-02 12:43:37 -05:00
William Hubbs
901b752463 README: force references to be on separate lines for github 2021-04-02 12:35:29 -05:00
William Hubbs
c88368b792 update news
This adds a note about SHLIBDIR being dropped from the makefiles.
2021-04-02 11:37:35 -05:00