William Hubbs
4a3454966a
Update ChangeLog
2018-12-21 12:24:18 -06:00
William Hubbs
63e40f31bf
fix compiler warnings
2018-12-21 12:20:35 -06:00
William Hubbs
e43ee29eb4
supervise-daemon: do not use the exec_service() function
...
In order to run healthcheck() and the unhealthy() function, add an
exec_command call to the supervisor.
Another difference is This function also logs errors instead of
attempting to display them.
This is for #271 .
2018-12-21 12:20:35 -06:00
William Hubbs
a3555b1442
Add debug logging to start-stop-daemon and rc-supervisor
...
This will make it easier to track down why the supervisor intermittently
hangs after it runs for a long time.
2018-12-21 12:20:35 -06:00
William Hubbs
eb863156fb
version 0.40.3
2018-12-21 12:20:12 -06:00
William Hubbs
ac76b24b85
Update ChangeLog
2018-12-06 17:40:06 -06:00
William Hubbs
b8e57c693a
init.d/agetty: set default respawn period to 60 seconds
...
Without a respawn period setting, the supervisor will give up on
respawning agetty after it is respawned respawn_max times. For most
daemons giving up like this is reasonable, but not for agettys. Agettys
should always be respawned unless they are respawning too fafst,.
If an agetty is respawning faster than 10 times in 60 seconds, this
seems to be too fast.
2018-12-06 16:56:20 -06:00
William Hubbs
5df12e2414
supervise-daemon: fix busy loop
...
This fixes #264 .
2018-12-06 16:56:20 -06:00
William Hubbs
461df0c78b
version 0.40.2
2018-12-06 16:55:51 -06:00
William Hubbs
cefae65392
Update ChangeLog
2018-12-04 17:27:46 -06:00
Alexander Zubkov
69fbd12993
supervise-daemon: redirect std{in,out,err} to /dev/null after demonizing
...
This fixes #239 .
2018-12-04 17:23:27 -06:00
William Hubbs
4aa5686d90
version 0.40.1
2018-12-04 17:21:55 -06:00
William Hubbs
ab6c8d56f1
Update ChangeLog
2018-12-03 15:56:19 -06:00
Austin English
fb4dd351c7
misc: make checks always fatal
...
This fixes #263 .
2018-12-03 15:26:42 -06:00
Austin English
10dc65cc46
src/rc/supervise-daemon.c: fix style issue
...
This is for #263 .
2018-12-03 15:26:20 -06:00
William Hubbs
9a2115f762
rc-status: show status for supervised services instead of a list
2018-12-03 15:16:17 -06:00
William Hubbs
eeba6df476
Update supervise-daemon man page
2018-12-03 13:08:25 -06:00
William Hubbs
ac42e81a64
supervise-daemon.sh: drop the unused stopsig variable
2018-12-03 12:43:12 -06:00
William Hubbs
af70862a7a
supervise-daemon: use a default pid file if one is not specified
...
Since the pid file is internal to us, start moving toward deprecating it
by not requiring the user to specify it.
In the next release, I plan on working on code to start phasing out the
use of a pid file if this is possible.
2018-12-03 12:41:29 -06:00
William Hubbs
fa6611b5af
rc-status: add --supervised option to show supervised services
2018-12-02 18:33:25 -06:00
William Hubbs
db01442580
rc-status: show failed services as failed
2018-12-02 18:33:25 -06:00
William Hubbs
ebf79db79e
supervise-daemon: mark a service failed if it respawns too many times
2018-12-02 18:33:25 -06:00
William Hubbs
1b5a3b4ef4
supervise-daemon: make respawn-max and respawn-period independent settings
2018-12-02 18:33:25 -06:00
William Hubbs
77262c359c
supervise-daemon: add support for a fifo
...
This will allow us to signal the daemon we are supervising as well as
send other commands to the supervisor in the future.
This fixes #227 .
2018-12-02 18:33:25 -06:00
William Hubbs
7f23e0461d
supervise-daemon: rework signal handling and main loop
...
This is needed in preparation for adding support for a fifo to allow us
to communicate with the supervisor to ask it to signal the child it is
supervising.
2018-12-02 18:33:25 -06:00
William Hubbs
ff4af908a5
Revert "checkpath: use O_PATH when available"
...
This reverts commit 2af0cedd59 .
After speaking with Luis Ressel on the Gentoo selinux team, I am reverting
this commit for the following reasons:
- Luis told me that he feels this is not the solution we need to address
the concern with checkpath; I will be working with him on another
solution.
- There are concerns about the way the path variable was handled
and the assert() call.
The path variable should be dynamically allocated using xasprintf
instead of defining a length at compile time. This would eliminate the
need for the assert() call.
- It introduces the definition of _GNU_SOURCE which makes it
easier to introduce portability concerns in the future (see #262 ).
2018-12-02 16:08:42 -06:00
Mike Gilbert
2af0cedd59
checkpath: use O_PATH when available
...
This avoids opening directories/files with read permission, which is
sometimes rejected by selinux policy.
Bug: https://bugs.gentoo.org/667122
2018-12-01 21:43:18 -08:00
William Hubbs
ee41e444ad
rc.conf: typo fix
...
X-Gentoo-Bug: 670874
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=670874
2018-11-29 08:19:56 -06:00
William Hubbs
b7828651ba
supervise-daemon: fix type of exiting flag
2018-11-28 16:06:07 -06:00
Austin English
e96f7d5658
src/tests/runtests.sh: add a FATAL_CHECKS variable to make whitespace/etc. fatal
2018-11-27 21:22:29 -05:00
Austin English
28b73fc524
src/rc/openrc-shutdown.c: fix style
2018-11-27 21:22:29 -05:00
Austin English
7a00c63420
fix misc whitespace issues
2018-11-27 21:22:29 -05:00
Austin English
f4597c546a
give TravisCI a try
2018-11-27 21:22:29 -05:00
Austin English
e10afc8e75
sh/functions.sh.in: return a different value for invalid input in yesno()
2018-11-18 13:22:59 -05:00
William Hubbs
0f704402a2
supervise-daemon: make the pidfile an implementation detail
...
The pidfile of the supervisor doesn't need to be adjustable by the
service script. It is only used so the supervisor can stop itself when
the --stop option is used.
2018-11-15 14:15:15 -06:00
William Hubbs
2504a2c25b
Do not complain if interrupted by a signal
...
In start-stop-daemon and rc-schedules, we were printing out a warning if
the nanosleep call was interrupted by a signal, but we did not treat
this as an error situation other than displaying the message, so there
is no need for the message.
2018-11-15 14:03:06 -06:00
William Hubbs
7eb3975543
Create save-keymaps and save-ktermencoding services
...
These services represent the parts of the keymaps and termencoding
services which saved the settings back to the root file system so they
can be loaded very early in the boot process.
These are needed to allow keymaps and termencoding to run earlier in the
boot sequence.
X-Gentoo-Bug: 446018
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=446018
2018-11-07 08:55:44 -06:00
William Hubbs
60e60dc9bb
supervise-daemon.sh: drop invalid --signal switch
...
This fixes #230 .
2018-11-06 10:54:02 -06:00
William Hubbs
008c9d0036
supervise-daemon: reap zombies
...
We need to make sure to reap zombies so that we can shut down
successfully.
Fixes #252 .
Possibly related to #250 .
2018-11-05 21:35:00 -06:00
William Hubbs
025c9693cc
rc-service: fix help output
2018-11-05 11:39:39 -06:00
William Hubbs
ee3c4afdb7
openrc-init: add SELinux support
...
This is for #173 .
2018-11-02 18:22:11 -05:00
William Hubbs
e2416d0893
openrc-shutdown: do not require a time for -w switch
...
X-Gentoo-Bug: 669500
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=669500
2018-10-24 15:24:40 -05:00
William Hubbs
a2bcfeb428
version 0.40
2018-10-24 15:18:10 -05:00
William Hubbs
53f7afd3b3
Update ChangeLog
2018-10-23 17:14:01 -05:00
William Hubbs
75e9b66f6f
news.md: add information about the modules service changes
2018-10-23 16:59:20 -05:00
William Hubbs
d70b1c55b6
modules: Add --first-time switch to modprobe commands
...
On Linux, kernel modules should be loaded once during boot, either in an
initramfs or by this service.
This does not change anything other than printing out messages if a
module is loaded more than once.
X-Gentoo-Bug: 659530
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=659530
2018-10-23 16:47:37 -05:00
William Hubbs
c1e582586d
supervise-daemon: add health checks
...
Health checks are a way to monitor a service and make sure it stays
healthy.
If a service is not healthy, it will be automatically restarted after
running the unhealthy() function to clean up.
2018-10-23 13:38:14 -05:00
William Hubbs
7a75bfb00c
news.md: add note about scheduled shutdown
2018-10-23 13:34:08 -05:00
William Hubbs
aacf841de4
supervise-daemon-guide.md: re-format and add more variables
2018-10-22 17:49:25 -05:00
William Hubbs
3f918161aa
openrc-shutdown: Add scheduled shutdown and the ability to cancel a shutdown
...
You can now schedule a shutdown for a certain time or a cpecific number
of minutes into the future.
When a shutdown is running, you can now cancel it with ^c from the
keyboard or by running "openrc-shutdown -c" from another shell.
2018-10-18 17:56:36 -05:00
Zac Medico
710c874e6e
supervise-daemon: fix respawn_max off by one
...
Fix the comparison between respawn_count and respawn_max so that
respawn_max = 1 will allow for one respawn. Since respawn_count is
incremented before the comparison, use a 'greater than' comparison
so that respawn will be triggered when respawn_count is equal to
respawn_max.
Fixes: https://github.com/OpenRC/openrc/issues/247
Fixes: https://github.com/OpenRC/openrc/issues/248
2018-10-15 11:50:42 -05:00
Austin English
07908be090
misc: style fixups
2018-10-13 12:53:54 -04:00
Austin English
02af093043
misc: whitespace fixes
2018-10-13 12:53:54 -04:00
William Hubbs
67e2d6033d
Complete implementation of forever timeout value in stop schedules
2018-10-09 11:34:52 -05:00
William Hubbs
eca4357892
supervise-daemon: use nanosleep() instead of sleep()
...
We will be using sigalrm in this process for health checking, and
sigalrm cannot be used with sleep() safely.
2018-10-06 12:51:04 -05:00
William Hubbs
7ee3e5b2d6
openrc-init: convert sleep() call to nanosleep()
...
Nanosleep is the safer call to use in case we need to use alarms
eventually.
2018-10-06 12:49:44 -05:00
William Hubbs
7cb8d94323
Stop mounting efivarfs read-only
...
We do not need to do this any longer since all supported linux kernels
make efivarfs immutable and the tools that manipulate it are aware of
this feature.
This fixes https://github.com/openrc/openrc/issues/238 .
2018-08-14 10:21:27 -05:00
Zac Medico
84ed570eae
librc: fix EACCES errno false-positive crash
...
Use errno != EACCES to fix false-positive for non-root users
with grsecurity kernels.
Fixes: 37e2944272 ("librc: Add check for crashed state")
This fixes #237
2018-08-06 17:39:52 -05:00
William Hubbs
2eea73bfd5
rc-functions.sh: Remove addon support
...
This is an old relic from Gentoo baselayout-1.x which should not be used
any longer.
2018-07-09 19:44:40 -05:00
William Hubbs
a571a42421
modules: remove the ability to rename modules on the fly
...
Kmod doesn't support the -o switch, so if you have been using this your
module loads have been failing.
2018-06-29 15:29:46 -05:00
Holger Hoffstätte
79648ac1c6
rc-status: initialize uptime pointer to prevent memory corruption
...
This fixes #231 .
2018-06-29 08:49:13 -05:00
William Hubbs
02af762e83
version 0.39
2018-06-28 13:32:19 -05:00
William Hubbs
01c34c28e6
Update ChangeLog
2018-06-28 13:02:42 -05:00
William Hubbs
56ddda54b5
supervise-daemon.c: clean up memory leaks
2018-06-27 17:37:11 -05:00
William Hubbs
3a803b3135
librc-daemon.c: fix memory leaks
2018-06-27 12:06:19 -05:00
William Hubbs
72df51e17b
librc-daemon: convert most snprintf calls to xasprintf
2018-06-22 15:41:25 -05:00
William Hubbs
b2f5531194
librc-misc: convert snprintf calls to xasprintf
2018-06-20 17:45:01 -05:00
William Hubbs
19bf49a710
libeinfo: convert remaining snprintf calls to xasprintf
2018-06-20 12:36:51 -05:00
William Hubbs
64354831da
openrc: convert snprintf calls to xasprintf
2018-06-20 09:37:20 -05:00
William Hubbs
e14edd765f
supervise-daemon: convert snprintf calls to xasprintf
2018-06-19 17:57:10 -05:00
William Hubbs
f9d41243d8
start-stop-daemon: convert snprintf calls to xasprintf
2018-06-19 17:46:12 -05:00
William Hubbs
be7ad06d4a
rc-status: convert snprintf calls to xasprintf
2018-06-19 17:06:33 -05:00
William Hubbs
a616516895
rc-status: fix gcc 7 warnings
2018-06-19 16:18:48 -05:00
William Hubbs
04721ece03
start-stop-daemon: fix gcc 7 warnings
2018-06-19 15:32:10 -05:00
William Hubbs
c7e8f1133a
checkpath: fix gcc 7 warnings
2018-06-19 14:01:54 -05:00
William Hubbs
47e4bfae57
fix gcc 7 warnings in pipe routines
2018-06-19 13:59:16 -05:00
William Hubbs
8a945194af
libeinfo: clean up gcc 7 compiler warnings
2018-06-19 13:52:40 -05:00
William Hubbs
aa4a004c29
version 0.38
2018-06-17 12:45:51 -05:00
William Hubbs
9ec5d36bdd
Update ChangeLog
2018-06-15 18:04:43 -05:00
William Hubbs
a097933eda
sh/start-stop-daemon.sh: fix processing of the logger arguments
2018-06-15 17:44:39 -05:00
William Hubbs
a6f5b1bb63
Update ChangeLog
2018-06-15 12:59:13 -05:00
William Hubbs
e6d01471fe
start-stop-daemon: add ability to log stdout or stderr to processes
2018-06-15 12:23:50 -05:00
William Hubbs
d4501a9f06
fix a typo
2018-06-14 14:55:42 -05:00
Mike Gilbert
ec8abea460
Add helper to spawn process with stdin connected to a pipe
2018-06-13 13:49:42 -05:00
William Hubbs
e4ddfa38e0
user-guide.md: small cleanups
2018-06-05 17:34:09 -05:00
William Hubbs
21d30bc6d9
service-script-guide.md: small cleanups
2018-06-05 17:26:57 -05:00
William Hubbs
2a1ff6e49c
version 0.37
2018-06-05 16:11:28 -05:00
William Hubbs
6762cb875c
Update ChangeLog
2018-05-31 16:53:25 -05:00
Austin English
6edf516a1f
sh/supervise-daemon.sh: use start_stop_daemon_args if supervise_daemon_args is undefined
2018-05-30 12:11:10 -04:00
William Hubbs
7e56a49e23
Logger: only log printable characters and newlines
...
X-Gentoo-Bug: 651412
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412
2018-05-22 17:11:43 -05:00
William Hubbs
fa5aea80c5
openrc-run.sh: move crashed test outside started test
...
This is handled inside librc, so we don't need the nesting in this
script.
2018-05-22 12:20:38 -05:00
William Hubbs
0f4fa41574
Add mark_service_crashed binary
2018-05-22 12:20:38 -05:00
William Hubbs
5d6dd97bba
rc-misc: add the crashed state
2018-05-22 12:20:38 -05:00
William Hubbs
37e2944272
librc: Add check for crashed state
...
In rc_service_state,, call rc_service_daemons_crashed to check for
a crashed daemon if the service is started.
2018-05-22 12:19:41 -05:00
William Hubbs
4e0eace837
librc: Add crashed state
2018-05-22 12:19:22 -05:00
William Hubbs
faa8318b3b
Remove the _rc_can_find_pids function
...
This test to find if we could see pid 1 was being used inconsistently in
rc-status and mark_service_crashed to decide whether we could test to
see if the daemon for the service was crashed, and it was not part of
the librc library.
I am removing it from the executables because of inconsistent usage. I
will add it to the library if it is needed there.
2018-05-18 16:48:21 -05:00
William Hubbs
08da36149c
rc-service: add --ifstarted and --ifstopped options
2018-05-16 13:25:22 -05:00
William Hubbs
56870d0db1
Man: rc-service man page cleanups
2018-05-15 17:09:56 -05:00
William Hubbs
4d47ce440c
rc-service: add -d/--debug and -D/--nodeps options
2018-05-15 16:59:21 -05:00
William Hubbs
958f57d895
openrc-run: respect the RC_NODEPS environment variable
2018-05-15 16:27:42 -05:00
William Hubbs
04886efd85
Add RC_DEBUG and RC_NODEPS to environment whitelist
...
These are needed so rc-service can pass debug and nodeps options to
openrc-run.
2018-05-15 16:18:19 -05:00
William Hubbs
d980798d64
openrc-run: respect the IN_DRYRUN environment variable
...
This allows rc-service to pass the tryrun option to openrc-run.
This is for #225 .
2018-05-14 19:08:19 -05:00
William Hubbs
414a9aae6c
rc-misc.c: Add IN_DRYRUN to environment whitelist
...
This allows rc-service to pass the dryrun option to openrc-run.
This is for #225 .
2018-05-14 19:04:42 -05:00
William Hubbs
a7f475ca04
rc-service: add a --dry-run option
...
This is for #225 .
2018-05-14 19:00:04 -05:00
William Hubbs
3c53680018
build: standardize installation modes
...
Gentoo was changing some of our installation modes from 0444 to 0644.
There isn't a reason to install things 0444, so we are switching these
to 0644 so the Gentoo ebuild doesn't need this extra step.
2018-05-11 15:38:27 -05:00
William Hubbs
f0ad647303
Revert "savecache: stop saving the dependency tree"
...
It is safe to save the deptree, but we also need to regenerate it at
boot time.
2018-05-11 11:54:48 -05:00
William Hubbs
b35e03b6b1
Revert "Logger: only log printable characters and newlines"
...
This reverts commit 2b1392af2f .
This seems to create issues shutting down, so I need to look into it
further.
2018-05-10 19:35:24 -05:00
William Hubbs
2b1392af2f
Logger: only log printable characters and newlines
...
X-Gentoo-Bug: 651412
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412
2018-05-09 17:30:08 -05:00
William Hubbs
a3d0e293ee
Remove localmount from dependencies for linux-only services
...
This removes localmount from the dependencies of the consolefont,
keymaps, numlock and procfs services.
These services are Linux only and the default modern linux system has /
and /usr on the same file system.
This also fixes the following issue.
X-Gentoo-Bug: 651998
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651998
2018-05-07 18:12:55 -05:00
Andrey Utkin
0200002b8c
start-stop-daemon: don't fail stopping if pidfile is gone
...
If pidfile does not exist when we are stopping the daemon, assume it is
already stopped, and report success.
hostapd is an example of a daemon which removes its pidfile when it is
exiting. If this daemon terminates prematurely, that is, without s-s-d
involvement, then openrc fails to restart it, because s-s-d "stop"
command fails when pidfile is missing.
X-Gentoo-Bug: 646274
X-Gentoo-Bug-URL: https://bugs.gentoo.org/646274
2018-05-02 13:42:59 -05:00
William Hubbs
f4e2142089
Add _POSIX_C_SOURCE definition to Linux build
...
We need this to allow builds on uclibc-ng based systems.
X-Gentoo-Bug: 650908
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=650908
2018-05-01 13:29:13 -05:00
William Hubbs
49a90f27a8
typo fix
2018-04-24 10:40:57 -05:00
Scall
2ae60ca041
rc-update: fix typo
2018-03-21 08:33:33 -04:00
William Hubbs
6b475ab269
init.d/modules: add code from modules-load service
...
There is no reason for these to be separate services. I did add a
provide so that we don't break backward compatibility.
2018-03-16 14:33:01 -05:00
William Hubbs
b302b0c094
net-online: always start after net
...
X-Gentoo-Bug: 650600
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=650600
2018-03-16 13:53:02 -05:00
William Hubbs
40aa69cf3a
agetty.in: allow status to be displayed
2018-03-14 20:37:02 -05:00
William Hubbs
5346fbf2c9
supervise-daemon: fix off-by-one error
2018-03-14 20:05:45 -05:00
William Hubbs
92e6bdee12
Use _BSD_SOURCE on FreeBSD
2018-03-14 13:07:46 -05:00
William Hubbs
71f275b2aa
typo fix
2018-03-14 10:45:40 -05:00
William Hubbs
6dc0d0af33
Remove _XOPEN_SOURCE macros from builds
2018-03-13 18:14:55 -05:00
William Hubbs
59a9e53378
Add _POSIX_C_SOURCE macro to FreeBSD build
2018-03-13 18:04:54 -05:00
William Hubbs
122768d339
man: document default retry specification for supervise-daemon
2018-03-12 18:22:40 -05:00
William Hubbs
fa3c60c0d8
man: document default retry sppecification for start-stop-daemon
2018-03-12 18:15:06 -05:00
William Hubbs
61905bfcf5
Clean up cgroups v2 code
...
Remove the IFS manipulation and simplify the loop that processes the
settings.
2018-03-11 21:41:01 -05:00
Scall
3e68013631
init.d: swap should always be started after root
...
Otherwise if a swap file is being used, and swap is started before
root, swapon may fail because of a read-only filesystem.
2018-03-05 20:16:26 -05:00
Chris Cromer
b46123f2e1
openrc-run: fix memory size ( #213 )
...
Fixes #212
2018-03-01 19:31:33 -05:00
William Hubbs
109869641f
fix build on FreeBSD
2018-03-01 11:47:29 -06:00
William Hubbs
e8a2305de0
version 0.36
2018-03-01 11:46:02 -06:00
William Hubbs
f62975a1f8
Update ChangeLog
2018-02-28 16:21:52 -06:00
Jason Zaman
5bb6f9aa31
init.sh: apply SELinux label for /run early in boot
...
Some initramfs mount /run which then ends up with the wrong labels.
Force relabel all of /run right after its mounted to fix.
2018-02-28 12:42:58 -06:00
Jason Zaman
1ab8541a6c
init-early.sh.Linux.in: apply the selinux label to /dev/console early
...
/dev/console is relabelled later in the devfs init script, but by then we
have already missed some of the messages, so fix that label early.
2018-02-28 11:24:55 -06:00
William Hubbs
038c03bef3
supervise-daemon: make an error message more verbose
2018-02-27 16:02:20 -06:00
William Hubbs
e51dc29e2f
cgroups: fix indentation
2018-02-27 15:56:54 -06:00
William Hubbs
c6047f887a
cgroups: add rc_cgroup_memory_use_hierarchy setting for cgroups v1
2018-02-26 14:33:15 -06:00
William Hubbs
0506d68427
fstabinfo: fix an error message
2018-02-26 13:46:47 -06:00
William Hubbs
c3d666acaf
openrc: remove unused #define's.
2018-02-26 13:14:31 -06:00
William Hubbs
e93b1d76d1
openrc: convert another execl() call to execlp()
2018-02-26 13:13:44 -06:00
William Hubbs
acf1e43f81
openrc-init: convert execl calls to execlp
2018-02-26 12:21:14 -06:00
William Hubbs
f383fd87b1
kill_all: change execl call to execlp
2018-02-24 17:02:02 -06:00
William Hubbs
cfded513cd
openrc-init: set a default path
...
The default path provided by the system if one isn't set only includes
"/bin:/usr/bin". This adds the default path setting from sysvinit.
2018-02-24 16:24:08 -06:00
Christian Brauner
16ff3cd8df
check whether /sys/fs/cgroup is a mountpoint
...
The current check only tries to detect whether /sys/fs/cgroup exists and
whether it is writable or not. But when the init system doesn't mount
cgroups then /sys/fs/cgroup will just be an empty directory. When paired
with unprivileged containers that mount sysfs this will cause misleading
errors to be printed since /sys/fs/cgroup will be owned by user
nobody:nogroup in this case. Independent of this specific problem this
check will also be misleading when the /sys/fs/cgroup exists and is in
fact writable by the init system but isn't actually a mountpoint.
Note from William. "grep -qs" doesn't need to redirect output to
/dev/null since it is completely silent.
This fixes #209 .
2018-02-23 15:51:12 -06:00
William Hubbs
38032626a6
improve cgroup configuration checks
...
make the base/controller functions return successfully if cgroups v1/v2
are not configured in the kernel
2018-02-23 15:07:04 -06:00
William Hubbs
aa7d3a7911
openrc: force deptree update for sysinit runlevel
2018-02-22 16:16:07 -06:00
William Hubbs
98262647a9
supervise-daemon: zero out the cmdline buffer when it is allocated
2018-02-22 12:54:21 -06:00
William Hubbs
5868abe97b
start-stop-daemon: compiler warning cleanup
2018-02-21 18:16:56 -06:00
William Hubbs
71aad16256
openrc-run: clean up a compiler warning
2018-02-21 18:15:35 -06:00
William Hubbs
e275da84de
supervise-daemon: remove references to PATH_MAX
2018-02-21 18:14:56 -06:00
William Hubbs
a6cc7f06cf
rc.c: remove PATH_MAX references
2018-02-21 13:49:41 -06:00
William Hubbs
c1178c8eeb
rc-selinux.c: remove references to path_max
2018-02-20 16:35:50 -06:00
William Hubbs
3c031ca978
rc-plubin.c: remove references to PATH_MAX
2018-02-20 16:01:15 -06:00
William Hubbs
8e02406d8f
rc-misc.c: remove references to PATH_MAX
2018-02-20 14:22:29 -06:00
William Hubbs
8dbdabcc5e
start-stop-daemon: clean up string handling
2018-02-16 14:04:40 -06:00
William Hubbs
488d8989c5
openrc-run: clean up string handling
...
- remove references to PATH_MAX
- use xasprintf to create strings
2018-02-15 15:26:40 -06:00
William Hubbs
9e14b35da8
rc-update: remove reference to PATH_MAX
2018-02-15 12:23:39 -06:00
William Hubbs
7b4879cb72
mountinfo: create strings with xasprintf
2018-02-14 16:56:19 -06:00
William Hubbs
74cfb455c5
kill_all: create strings with xasprintf
2018-02-14 16:50:24 -06:00
William Hubbs
0110487722
helpers.h: silence compiler warnings about xasprintf
2018-02-10 16:48:22 -06:00
William Hubbs
68b9b0bc2a
xasprintf: exit if return value of vsnprintf is invalid
2018-02-10 14:49:40 -06:00
William Hubbs
4616f8f809
helpers.h: add xasprintf function
...
This is our own version of asprintf(). This original code was written by
Mike Frysinger, and I was able to modify it to use our memory helper
functions.
We need a version of this code because it is not available on glibc at
least without defining _GNU_SOURCE, and I would rather not do that.
This is the first step in improving string handling in OpenRC for #207 .
2018-02-09 16:27:12 -06:00
William Hubbs
287d71bd25
helpers.h: style fix
2018-02-09 15:35:12 -06:00
Michael Orlitzky
c1ffe4d9f2
man/openrc-run.8: fix mountinfo args.
...
The "Ar" tag for the mountinfo command contained a typo (leading
space) that resulted in the tag being output verbatim; that is,
mountinfo ... .Ar mount1 mount2
rather than e.g.
mountinfo ... <mount1> <mount2>
This commit deletes the leading space to fix the output.
This fixes #204 .
2018-02-06 13:53:11 -06:00
Michael Orlitzky
4c517bdb2b
man/openrc-run.8: add missing "Xo" tags for fstabinfo and mountinfo.
...
The BUILTINS are all surrounded by Xo...Xc tags, but the opening "Xo"
was missing from the two commands fstabinfo and mountinfo. This commit
adds them, and thereby fixes the spacing when viewed by man.
This is for #204 .
2018-02-06 13:52:36 -06:00
William Hubbs
110582491f
service-script-guide.md cleanups
...
Refer to /var/run in the documentation instead of /run, and make it
clear at the top of the pidfile section that we use /run under Linux.
This is for #202 .
2018-01-24 17:43:08 -06:00
William Hubbs
5dd1d39d20
typo fix
2018-01-24 10:56:33 -06:00
William Hubbs
1771bc2a83
checkpath: use fchown and fchmod to handle ownership and mode changes
...
This is related to #195 .
This is an attempt to shorten the window for the first two issues
discussed by using a file descriptor which does not follow symbolic
links and using the fchmod and fchown calls instead of chown and chmod.
with.
2018-01-23 16:56:06 -06:00
William Hubbs
87c98ebb01
checkpath: fix lchown error message
...
X-Gentoo-Bug: 643084
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=643084
2018-01-16 13:34:37 -06:00
William Hubbs
4af5a80b0c
_rc_deptree_load - return NULL if the stat() call is not successful
...
X-Gentoo-Bug: 643084
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=643084
2018-01-16 13:11:22 -06:00
William Hubbs
fee2ffe559
Reformat and fix titles in documentation
2018-01-12 14:10:42 -06:00
William Hubbs
8878f8916b
Rename guide.md to user-guide.md to better describe its purpose
2018-01-11 10:57:05 -06:00
William Hubbs
14e3359a9e
move developer documentation from guide.md to service-script-guide.md
2018-01-10 13:25:13 -06:00
William Hubbs
918d955fd2
checkpath: use lchown instead of chown
...
Checkpath should never follow symbolic links when changing ownership of a file.
This is for https://github.com/openrc/openrc/issues/195 .
2018-01-09 17:25:28 -06:00
William Hubbs
92cfa0e543
service-script-guide.md: formatting changes
...
Add a title, adjust the headings and update the example that referred to
"net.lo" to refer to "loopback".
2018-01-08 15:33:03 -06:00
Michael Orlitzky
c2bd33e483
service-script-guide.md: new guide for service script authors.
...
This fixes #162 .
2018-01-08 13:59:12 -06:00
3PO
f42ec82f21
net-online: only process symbolic links in /sys/class/net
...
The /sys/class/net directory contains files which are not symlinks if
the system has bonded devices [1]. We should ignore these files.
This fixes #196 .
[1] https://elkano.org/blog/manage-interface-bondings-sysfs-interface/
2018-01-05 14:56:33 -06:00
William Hubbs
7affff568a
init.d.examples: pid files always go in /var
...
This removes the @VARBASE@ substitution since it is always translated to
/var.
2017-12-20 11:01:29 -06:00
William Hubbs
4f750933fd
procfs: remove the @sysconfdir@ reference
2017-12-14 17:31:57 -06:00
William Hubbs
50b69d564a
hostname: replace @SYSCONFDIR@ references with /etc
...
I do not know of any situation where /etc/hostname is at any other
location. Also, this does not run on prefix.
2017-12-14 17:07:31 -06:00
William Hubbs
eb18f4f348
hwclock: use shell variables for configuration file path
...
This removes a reference to @SYSCONFDIR@.
2017-12-14 16:38:09 -06:00
William Hubbs
d5f3fe52c8
sysctl: hard code paths for sysctl files on *bsd
...
For *BSD,the sysctl*.conf files are always in /etc.
2017-12-14 14:18:39 -06:00
William Hubbs
bb1bc6eeb7
local: misc cleanups
...
Remove references to @SYSCONFDIR@ since these can be calculated at
runtime.
Also style fixes.
2017-12-14 12:52:03 -06:00
William Hubbs
53844fd0dc
devfs: cleanup
...
clean up local definitions. Also remove @SYSCONFDIR@ substitutions since
they can be calculated at runtime.
2017-12-14 12:08:38 -06:00
bell07
14938c29ce
net-online: wait for ping_test_host
...
The script should wait till the ping host is available or timeout reached
Closes : #179
Closes : #191
2017-12-12 16:29:34 -06:00
William Hubbs
8bf501aaf2
network: use 'command -v ip' to test for the ip executable
...
This is an improved test because it doesn't require the ip executable to be
in a specific path.
2017-12-12 14:23:04 -06:00
William Hubbs
9d05f68b51
Do not use file tests in net-online
...
https://unix.stackexchange.com/questions/252002/help-testing-special-file-in-sys-class-net
This is for #189
2017-12-12 12:45:52 -06:00
William Hubbs
ee2524cd1d
net-online: clean up quoting and test for existence
...
This is for #178 .
2017-12-11 17:41:04 -06:00
Marcel Greter
5c81661d47
Gracefully handle unreadable /sys/class/net/dev/ nodes
...
Fixes https://bugs.gentoo.org/629228
Fixes #189
Fixes #185
Fixes #178
2017-12-11 14:46:16 -06:00
William Hubbs
fb96c9c127
Make bash-completion and zsh-completion optional
2017-12-07 12:53:04 -06:00
William Hubbs
6c456f9383
Add zsh-completion support
2017-12-07 11:30:32 -06:00
William Hubbs
d220fc2723
add bash completion support
...
This fixes #188 .
2017-12-06 13:25:26 -06:00
William Hubbs
a2447dfb42
rc-service: add --ifcrashed option
...
This works like the other --if options. If the service is crashed, run
the command.
This fixes #154 .
2017-12-04 17:17:17 -06:00
William Hubbs
cee3919908
Clean up the calls to group_add_service
...
This function should only be called once and it does not take any
arguments.
X-Gentoo-Bug: 639166
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=639166
2017-12-01 15:43:09 -06:00
William Hubbs
0feadd2922
man/openrc-run.8: update documentation for command_user
2017-11-30 16:00:42 -06:00
Will Miles
a7c99506d9
Fix repeated dependency cache rebuild if clock skewed
...
rc_deptree_update_needed would return early as soon as it found
any file newer than the existing dependency cache. Unfortunately,
the first file found may not be the newest one there; so the
clock skew workaround in rc-misc:_rc_deptree_load would be given
a timestamp that was still too old.
This fix forces a full scan of all relevant files, so as to
ensure that we return a timestamp that will allow the clock skew
fix to operate. The runtime cost is no worse than the case where
the cache is up to date (ie. we must check every possible file).
This fixes #161 .
2017-11-30 13:56:54 -06:00
Julien Reichardt
f012930775
man/openrc-run.8: remove white space
...
This is for #184 .
2017-11-29 15:06:06 -06:00
Julien Reichardt
ddbdb69658
add more variables for start-stop-daemon and supervise-daemon options
...
Add the following variables to expose more arguments that can be passed
to start-stop-daemon or supervise-daemon:
- directory will be passed to --chdir
- error_log will be passed to --stderr
- output_log will be passed to --stdout
- umask will be passed to umask
This is for #184 .
2017-11-29 15:06:06 -06:00
Doug Freed
c84ebb94d1
start-stop-daemon: properly handle missing pidfile
...
X-Gentoo-Bug: 639218
X-Gentoo-Bug-URL: https://bugs.gentoo.org/639218
2017-11-29 15:10:39 -05:00
William Hubbs
3de6395ae3
split cgroups mounting out of sysfs
...
This is neceessary to allow cgroups to be mounted in an lxc/lxd
container.
Fixes https://github.com/openrc/openrc/issues/187
2017-11-28 17:14:33 -06:00
William Hubbs
6bb7ebec48
fix FreeBSD build
...
This is for #186 .
2017-11-27 11:10:00 -06:00
Doug Freed
a192caf88f
rc-schedules: if given nothing to look for, stop
...
This avoids trying to kill everything.
X-Gentoo-Bug: 631958
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=631958
2017-11-19 11:05:30 -05:00
William Hubbs
e805c74d31
s6 supervisor fixes
...
Add the ability to force-kill a service if it does not go down
successfully. Also, adjust the default wait time for an s6 service to go
down to 60 seconds.
2017-11-16 15:35:35 -06:00
William Hubbs
318e873481
strongly encourage Linux users to not make /etc/mtab a flat file
...
The OpenRC team does not currently know of any modern linux tools that
require /etc/mtab to be a flat file, so this puts users on notice that
the mtab service will be removed in the future.
2017-11-14 15:41:03 -06:00
William Hubbs
0d15898f58
adjust mtab and localmount dependencies
...
localmount had mtab in its "use" dependencies; however, it makes more
sense to add "before localmount" to the mtab service and remove
"use mtab" from the localmount service.
2017-11-14 13:20:49 -06:00
William Hubbs
971e82784c
rc_find_pids: namespace fix
...
Ignore namespaces if there are errors reading either the pid namespace
for the current process or the process we aare testing.
This fixes https://github.com/openrc/openrc/issues/180 .
2017-11-13 16:54:57 -06:00
William Hubbs
90d9ea656f
start-stop-daemon: do not use do_stop to verify whether a daemon is running
...
X-Gentoo-Bug: 636574
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=636574
2017-11-07 15:30:34 -06:00
William Hubbs
a3d1c8a0e7
fix issue with --reexec call
2017-10-30 18:21:39 -05:00
William Hubbs
913b2ca537
supervise-daemon: use RC_SVCNAME as the first argument to the daemon
...
This makes ps show which service the supervisor is monitoring.
2017-10-27 19:22:09 -05:00
William Hubbs
3fe99c8b82
supervise-daemon: fix logging for reexec and the child command line
2017-10-27 17:34:29 -05:00
William Hubbs
27b8183de2
log as supervise-daemon not the service
2017-10-27 15:33:47 -05:00
William Hubbs
f32d8e1bfe
supervise-daemon: clarify a log message
2017-10-26 17:01:17 -05:00
William Hubbs
d019f34a83
supervise-daemon: log the command line we run to spawn the child process
2017-10-26 13:57:04 -05:00
William Hubbs
bb9c481f02
supervise-daemon: log with the service name instead of "supervise-daemon"
2017-10-26 13:36:41 -05:00
William Hubbs
82da844b42
implement "unsupervised" status
...
The unsupervised status is to be used when a supervisor of a supervised
service dies but leaves the service daemon itself running.
2017-10-26 13:11:12 -05:00
William Hubbs
667a09983c
supervise-daemon: remove child_pid from saved options during shutdown
...
This allows us to detect when the supervisor dies unexpectedly because
in that case child_pid will still exist.
2017-10-26 12:58:59 -05:00
William Hubbs
cf429ee359
rc_service_value_set: remove the option if NULL is the value
...
This allows the equivalent of "unsetting" a value for a service.
2017-10-26 12:54:37 -05:00
William Hubbs
6f3e2e2d7d
supervise-daemon.sh: fix status function with no namespaces
2017-10-25 21:20:15 -05:00
Patrick McLean
35b88fb42b
cgroups_cleanup: clean up shutdown signaling
...
- do not sleep for the full 90 seconds if processes are dead
- re-arrange the order of signals we attempt to send to the processes
2017-10-25 21:19:15 -05:00
William Hubbs
a428c325a9
add "unsupervised" status and return code 64 to supervise-daemon status function
...
This is to be used if the service is being supervised and the
supervisor is somehow killed.
Currently, this is very linux specific, but I will expand to other
platforms, patches are welcome.
2017-10-25 15:09:42 -05:00
William Hubbs
3219ecd608
supervise-daemon: fix build issue for >=glibc-2.26
...
X-Gentoo-Bug: 635334
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=635334
2017-10-24 16:47:53 -05:00
William Hubbs
0d8dc4f798
version 0.35
2017-10-24 16:46:52 -05:00
William Hubbs
f3c70bf5b5
Update ChangeLog
2017-10-24 10:42:11 -05:00
William Hubbs
f5acc66db7
rc_find_pids: ignore pids that are not in our pid namespace
...
X-Gentoo-Bug: 634634
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=634634
2017-10-24 10:37:37 -05:00
William Hubbs
fdce4769f2
supervise-daemon: multiple fixes
...
- Harden against dying by handling all signals that would terminate the
program and adding --reexec support
- factor the supervisor into its own function
- fix test for whether we are already running
2017-10-24 10:26:18 -05:00
William Hubbs
35b1996704
supervise-daemon: elevate some log messages to warnings
...
Prior to this change, we were logging unexpected terminations of daemons
we were supervising at the info level. This change moves the logs to
warnings.
2017-10-18 18:07:50 -05:00
William Hubbs
3c8e7ed255
version 0.34
2017-10-13 16:10:57 -05:00
William Hubbs
acaed1f910
Update ChangeLog
2017-10-13 11:29:49 -05:00
William Hubbs
91109e31d8
update news
2017-10-12 18:54:17 -05:00
William Hubbs
2b6eeea01d
man: remove service(8) man page
2017-10-12 18:47:36 -05:00
William Hubbs
a15de23e57
typo fix
2017-10-10 10:56:27 -05:00
William Hubbs
efa9ba485d
init.d/sysfs.in: fix reference to RC_LIBEXECDIR
...
The sysfs init script referred to @LIBEXECDIR@ before this change, but
it is better to refer to RC_LIBEXECDIR so that we get rid of a sed
substitution.
2017-10-09 15:54:06 -05:00
d4ddd72701
add option to make agetty startup quiet
...
This fixes #150
2017-10-06 14:43:59 -05:00
William Hubbs
1e9af2cd42
fix compiler warning
2017-10-05 18:31:07 -05:00
William Hubbs
3c05db74f6
remove service binary
...
The service binary was just a synonym for rc-service, so use rc-service
instead of service. If you want a "service" binary, it should be
something that can determine which service manager you are running and
run the appropriate service manager commands.
2017-10-02 18:09:09 -05:00
William Hubbs
edc54b0377
version 0.33
2017-10-02 16:58:59 -05:00
William Hubbs
8e53a3fa8a
Update ChangeLog
2017-10-02 11:21:29 -05:00
William Hubbs
7f3b413111
use printf consistently in cgroups handling
...
This makes the cgroups handling consistent between cgroups v1 and v2.
Also, it fixes #167 .
2017-09-29 12:51:12 -05:00
William Hubbs
1ccba05658
sh/rc-functions.sh: add need_if_exists convenience function
2017-09-22 17:22:50 -05:00
William Hubbs
c46adf1434
man/openrc-run.8: Clarify the explanation of the need dependency
2017-09-22 16:24:20 -05:00
William Hubbs
1cac8b080c
ignore sigchld when shutting down the supervised process
...
We need to do this to skip the zombie state for the child process since
we are not easily able to wait() for it.
2017-09-18 16:59:18 -05:00
William Hubbs
b58194ef63
typo fix
2017-09-18 13:30:56 -05:00
William Hubbs
b28c0d6f66
typo fix
2017-09-18 13:03:34 -05:00
William Hubbs
3cf19b0f30
supervise-daemon: code cleanup
...
Clean up the process for killing an active supervisor when stopping.
2017-09-18 12:25:37 -05:00
William Hubbs
0eb47b9af3
initialize the stop schedule
2017-09-18 10:36:17 -05:00
William Hubbs
4ab60ff109
rc-schedules.c: pass the correct pid to rc_find_pids
...
This is for #163 .
2017-09-17 14:20:05 -05:00
Jason Zaman
db4a578273
selinux: fix const qualifier warning
...
rc-selinux.c: In function ‘selinux_setup’:
rc-selinux.c:361:9: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
curr_t = context_type_get(curr_con);
^
2017-09-17 11:41:24 -05:00
Jason Zaman
b1c3422f45
selinux: use openrc contexts path to get contexts
...
The minimum requirement for libselinux is now >=2.6
The refpolicy and the gentoo policy contain the
contexts since version 2.20170204-r4
2017-09-17 11:40:07 -05:00
William Hubbs
3fafd7a76e
sysfs: fix cgroup hybrid mode
...
In hybrid mode, we should not try to mount cgroup2 if it is not
available in the kernel.
This fixes #164 .
2017-09-16 17:02:52 -05:00
William Hubbs
cd5722aca5
cgroup2_find_path: use legacy mode if cgroup2 is not in the kernel
...
This is related to #164 .
2017-09-16 16:49:22 -05:00
William Hubbs
dcb4a4d261
version 0.32
2017-09-16 13:24:52 -05:00
William Hubbs
e312e56997
Update ChangeLog
2017-09-15 15:33:24 -05:00
William Hubbs
2f60a959b4
update news file
2017-09-15 14:25:33 -05:00
William Hubbs
25b45a5a23
cgroup_cleanup: try to remove the cgroup version 2 cgroup
...
If we were able to kill all the processes in the cgroup, it should be
removed.
2017-09-15 14:22:34 -05:00
William Hubbs
4651b8c7e9
rc-cgroup.sh: cgroup_cleanup fix error handling
...
cgroup_cleanup should warn if it is unable to clean up all processes in
the control group, but it will always return success.
2017-09-15 13:42:50 -05:00
William Hubbs
50608b54ed
rc-cgroup.sh: fix signal names
...
The "SIG" prefix on signal names passed to kill -s isn't portable.
2017-09-15 13:28:15 -05:00
William Hubbs
b0a077a35f
add quiet switch to do_stop in src-schedules.c
...
This allows supervise-daemon to run this code without attempting to
print some status messages used by start-stop-daemon.
2017-09-14 18:24:39 -05:00
William Hubbs
6a5ca2ab36
make the procedure for killing child processes of services configurable
2017-09-14 16:17:20 -05:00
William Hubbs
2b0345165e
Make cgroup_cleanup send only one sigterm and sigkill
...
Instead of looping and sending multiple signals to child processes in
cgroup_cleanup, we send sigterm followed by sleeping one second then
sigkill.
This brings us more in line with systemd's "control group" killmode
setting.
Also, this commit includes several shellcheck cleanups.
2017-09-14 10:55:06 -05:00
William Hubbs
8885580986
rc-cgroup.sh: move cgroup_cleanup to the end of the file
2017-09-14 10:44:52 -05:00
William Hubbs
6d7713a758
guide.md: clarify cgroups documentation
...
Update the documentation to reflect cgroups version 2 support.
Also, add a section on dealing with orphaned service processes.
This fixes #94 .
2017-09-14 10:39:38 -05:00
William Hubbs
457f928e79
add support for control groups version 2
...
This is for #94 .
2017-09-14 10:38:10 -05:00
William Hubbs
a71a461e45
version 0.31
2017-09-07 11:28:09 -05:00
William Hubbs
a09b8af3f9
Update ChangeLog
2017-09-06 17:31:01 -05:00
William Hubbs
382efdbfcb
add quiet parameter to run_stop_schedule
2017-09-06 17:22:35 -05:00
William Hubbs
17b5cc78d3
add retry option to supervise-daemon
...
The --retry option for supervise-daemon defines how the supervisor will
attempt to stop the child process it is monitoring. It is defined when
the supervisor is started since stopping the supervisor just sends a
signal to the active supervisor.
This fixes #160 .
2017-09-06 17:22:21 -05:00
William Hubbs
36a0ab9054
make run_stop_schedule accept a pid instead of a pid file
2017-08-25 11:36:45 -05:00
William Hubbs
27c2bd997d
version 0.30
2017-08-24 11:44:32 -05:00
William Hubbs
d7938f54f2
start-stop-daemon: move --retry processing code to a shared module
...
This was part of start-stop-daemon; however, it needs to be shared in
order to be used by supervise-daemon.
2017-08-24 11:34:18 -05:00
William Hubbs
cfbe9c2ede
move get_pid function to a shared file
2017-08-23 14:36:50 -05:00
William Hubbs
df28002b72
Update ChangeLog
2017-08-16 11:38:37 -05:00
William Hubbs
66ed8082d0
sh/openrc-run: source service script before ulimit is processed
...
This is needed to allow the service script author to set a default for
rc_ulimit inside the service script.
2017-08-15 17:15:14 -05:00
William Hubbs
c2d256bafb
man/openrc-run.8: document fstabinfo and mountinfo
...
X-Gentoo-Bug: 592374
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=592374
2017-07-26 11:31:34 -05:00
William Hubbs
f48d9c33a5
man/openrc-run.8: document _pre and _post functions
...
Fixes https://github.com/openrc/openrc/issues/155 .
2017-07-25 13:54:12 -05:00
Jason Graham
6d4e843397
fix ENT macro usage
...
X-Gentoo-Bug: 624796
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=624796
2017-07-24 18:24:18 -05:00
William Hubbs
0513cd3964
version 0.29
2017-07-24 17:28:54 -05:00
John R. Graham
72bb2e57de
Typo fix
...
X-Gentoo-Bug: 624908
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=624908
2017-07-24 17:24:13 -05:00
William Hubbs
84c5da3069
Update ChangeLog
2017-07-13 17:51:02 -05:00
William Hubbs
b35099cb70
Add comment about overriding the default efivars mount in fstab to news
2017-07-13 17:49:25 -05:00
William Hubbs
3fd3bfc76d
add link to efivars issue to news file
2017-07-11 15:10:16 -05:00
William Hubbs
492a6303cb
Update ChangeLog
2017-07-11 14:57:13 -05:00
William Hubbs
e7807b3136
fix sysvinit compatibility for shutdown wrapper
2017-07-11 14:41:29 -05:00
William Hubbs
03a461ac0e
fix sysvinit compatibility for reboot wrapper
2017-07-11 11:53:23 -05:00
William Hubbs
7e0f76e0ad
fix sysvinit compatibility for poweroff wrapper
2017-07-11 11:10:46 -05:00
William Hubbs
9812ce5b8d
fix halt wrapper so it is sysvinit compatible
...
This makes the halt wrapper sysvinit compatible. It ignores several
command line switches which are not currently implemented; however,
those can be implemented if we need to do so.
This fixes https://github.com/openrc/openrc/issues/146 .
2017-07-10 18:36:24 -05:00
Adam Borowski
12f75e4167
man: fix an unclosed .Bl/.El warning
...
This fixes #151 .
2017-07-07 17:14:31 -05:00
Adam Borowski
260368e010
man: fix missing .Pp warnings
...
This fixes #151 .
2017-07-07 17:13:40 -05:00
William Hubbs
f87a9eec3d
init.d/sysfs: mount efivars read only
...
This fixes #134 .
2017-06-13 13:19:36 -05:00
William Hubbs
1e837d596e
fix argument parsing for the sysvinit shutdown wrapper
...
This fixes #140 .
2017-06-12 17:58:18 -05:00
William Hubbs
dcc686e42b
scripts/shutdown: fix arguments to be sysvinit shutdown compatible
...
This fixes #140 .
2017-06-12 12:24:18 -05:00
William Hubbs
2f81c100af
Fix link to shutdown for MKSYSVINIT=yes
2017-06-12 12:12:50 -05:00
Nuno Silva
a511a48d77
init.d/hostname: fix default parameter syntax
...
The syntax for expanding a variable with a default value is
${parameter:-word}
not
${parameter-word}
although the latter still works for a reason I could not explain.
This fixes #143 .
2017-06-12 10:44:27 -05:00
Nuno Silva
1e5322e5c5
init.d/hostname: fix indentation
...
This is for #143 .
2017-06-12 10:43:55 -05:00
udeved
199a210d2f
scripts/Makefile: make symlinks absolute instead of relative
...
This closes #142 .
2017-06-12 10:39:44 -05:00
udeved
5b7667af32
scripts/Makefile: respect SBINDIR with MKSYSVINIT
...
This is for #142 .
2017-06-12 10:38:47 -05:00
Jory A. Pratt
11243f85b6
kill_all: include limits.h for PATH_MAX
2017-06-08 10:04:19 -05:00
William Hubbs
3c40826d34
version 0.28
2017-06-08 08:45:16 -05:00
William Hubbs
560d874d2f
fix compile issue for musl
2017-06-08 08:43:42 -05:00
William Hubbs
e84366fd23
Update ChangeLog
2017-06-07 12:03:52 -05:00
William Hubbs
caacedc0a8
man: update openrc-shutdown man page
...
Add the new wtmp options and fix some cross references.
2017-06-07 11:28:01 -05:00
William Hubbs
84d140a1f6
scripts/shutdown: pass --single to openrc-shutdown
...
Sysvinit shutdown has a default of single user mode, but openrc-shutdown
makes you choose a default action. Because of this, the shutdown wrapper
needs to pass --single to openrc-shutdown.
2017-06-07 10:59:42 -05:00
William Hubbs
ee886c4482
openrc-shutdown: add --single option and clean up option processing
2017-06-05 15:49:22 -05:00
William Hubbs
1801561c2d
init.d/bootmisc: use openrc-shutdown instead of halt to write halt record
...
This fixes #139 and fixes #128 .
and fixes #124 .
2017-06-05 16:52:50 +00:00
William Hubbs
7689106aa1
add support for writing reboot and shutdown records to wtmp
2017-06-04 20:56:03 -05:00
William Hubbs
1564e155b7
openrc-init: add optional sysvinit compatibility
2017-05-31 18:07:02 -05:00
William Hubbs
44bac3c379
Change killprocs to use kill_all instead of killall5
...
X-Gentoo-Bug:376977
X-Gentoo-Bug-URL:https://bugs.gentoo.org/show_bug.cgi?id=376977
2017-05-30 18:48:33 -05:00
Sergei Trofimovich
0ddee9b7d2
openrc-init: fix buffer overflow in init.ctl
...
How to reproduce 1-byte overflow:
```
$ FEATURES=-test CFLAGS="-fsanitize=address -O0 -ggdb3" emerge -1 openrc
=================================================================
==1==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff0efd8710
at pc 0x000000402076 bp 0x7fff0efd7d50 sp 0x7fff0efd7d40
WRITE of size 1 at 0x7fff0efd8710 thread T0
#0 0x402075 (/sbin/openrc-init+0x402075)
#1 0x3cf6e2070f in __libc_start_main (/lib64/libc.so.6+0x3cf6e2070f)
#2 0x4013b8 (/sbin/openrc-init+0x4013b8)
Address 0x7fff0efd8710 is located in stack of thread T0 at offset 2432 in frame
#0 0x401cfb (/sbin/openrc-init+0x401cfb)
This frame has 3 object(s):
[32, 160) 'signals'
[192, 344) 'sa'
[384, 2432) 'buf' <== Memory access at offset 2432 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow ??:0 ??
```
The problem here is in the code handling reads from 'init.ctl':
```
int main(int argc, char **argv) {
...
char buf[2048];
for (;;) {
/* This will block until a command is sent down the pipe... */
fifo = fopen(RC_INIT_FIFO, "r");
count = fread(buf, 1, 2048, fifo);
buf[count] = 0;
...
}
```
`buf[count] = 0;` writes outside the buffer when `fread()` returns non-truncated read.
This fixes #138 .
2017-05-30 16:21:23 -05:00
Sergei Trofimovich
688566c535
mk/cc.mk: make implicit function declarations fatal ( #136 )
...
Avoids issues with missing prototypes causing truncation of pointers.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org >
2017-05-30 03:51:42 -04:00
Sergei Trofimovich
7185e242ff
rc-logger.c: fix crash on fclose(NULL) ( #137 )
...
Only close the log if we successfully opened it.
Reported-by: Brian Evans <grknight@gentoo.org >
Tested-by: Brian Evans <grknight@gentoo.org >
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org >
2017-05-30 03:47:55 -04:00
William Hubbs
ec27299f4b
typo fix
...
X-Gentoo-Bug: 618888
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=618888
2017-05-22 12:52:58 -05:00
William Hubbs
1ece16bfcd
openrc-shutdown: add dry-run option
2017-05-22 12:42:37 -05:00
William Hubbs
0cfd0dd9ef
openrc-shutdown: move to single user mode by default
...
To be more compatible with sysvinit, move to single user mode if no
options are specified on the command line.
2017-05-22 12:15:15 -05:00
William Hubbs
a77ee2e941
init: add ability to switch to single user mode
2017-05-22 11:29:23 -05:00
William Hubbs
49b8a573a1
add kill_all helper
...
This is similar to the sysvinit killall5 utility. It should only be used
in service scripts, so it will not be installed in the path.
This closes #129 .
2017-05-19 18:13:39 -05:00
William Hubbs
a2055af900
rc_status: calculate time differences in time_t and display seconds in uptime
2017-05-15 18:55:47 -05:00
William Hubbs
cbf96967f1
supervise-daemon: save start time and respawn count before dropping privs
2017-05-12 17:15:55 -05:00
William Hubbs
f1013037b4
version 0.27
2017-05-12 17:14:15 -05:00
William Hubbs
e4bfb4530a
update ChangeLog
2017-05-11 22:00:41 -05:00
William Hubbs
78e0042ecc
man/rc-status: document changes for supervised daemons
...
rc-status now shows the amount of time a supervised daemon has been
active as well as the number of times it has been respawned during the
current respawn period.
2017-05-11 21:55:31 -05:00
William Hubbs
82e12e3092
rc-status: show uptimes and respawn counts for supervised daemons
2017-05-11 21:39:03 -05:00
William Hubbs
1ebef0d7a3
fix to_time_t to honor dst
2017-05-11 18:13:13 -05:00
William Hubbs
6b4050ab9c
fix from_time_t function
2017-05-11 16:22:12 -05:00
William Hubbs
cf5e9aa2bb
Move time_t conversions to rc-misc.c so they can be shared
2017-05-11 16:06:12 -05:00
William Hubbs
a3250e77d4
supervise-daemon: save start time and respawn count
...
This will allow rc-status to display an uptime and restart count for
supervised processes.
2017-05-11 13:54:20 -05:00
William Hubbs
df027ca472
supervise-daemon: fix our status when we give up on the child process
2017-05-11 11:36:42 -05:00
William Hubbs
4c89e3f5fa
supervise-daemon:create multiple options from --respawn-limit
...
This creates --respawn-delay, --respawn-max and --respawn-period. It was
suggested that it would be easier to follow if the options were
separated.
This is for #126 .
2017-05-10 18:13:23 -05:00
William Hubbs
3673040722
supervise-daemon: add a --respawn-limit option
...
Allow limiting the number of times supervise-daemon will attempt to respawn a
daemon once it has died to prevent infinite respawning. Also, set a
reasonable default limit (10 times in a 5 second period).
This is for issue #126 .
2017-05-09 18:30:08 -05:00
William Hubbs
96c8ba2fb5
supervise-daemon: mark all open file descriptors FD_CLOEXEC
2017-04-29 13:48:45 -05:00
William Hubbs
47cf1d0c70
supervise-daemon:remove the controlling tty in the supervisor
2017-04-29 12:04:15 -05:00
William Hubbs
06a6a27e44
supervise-daemon: fix access to tty_fd and devnull_fd
...
Both the child and supervisor need access to these file descriptors.
2017-04-29 10:12:16 -05:00
William Hubbs
5de3798afc
supervise-daemon: mark the service started when the supervisor is active
2017-04-29 09:41:07 -05:00
William Hubbs
6ac094a59c
version 0.26
2017-04-19 17:24:44 -05:00
William Hubbs
84c81ca02d
update ChangeLog
2017-04-17 12:35:12 -05:00
William Hubbs
0e3f872098
init: send term/kill signals as final step of shutdown
2017-04-17 12:23:45 -05:00
William Hubbs
5fd3747b19
reword the bugs section of the openrc-init man page
2017-04-14 11:11:07 -05:00
William Hubbs
4694900190
init: fix signal handling
...
The only signals we handle are SIGINT and SIGCHLD, so block all others
and unblock them in the child process before we start a rurnlevel.
2017-04-13 12:54:30 -05:00
William Hubbs
05738bfce1
init: add re-exec capability
...
This will allow the re-execution of the init process after upgrading
OpenRC.
2017-04-12 17:56:36 -05:00
i.Dark_Templar
6f88ee4ec6
bootmisc: do not remove ld-elf32.so.hints
...
File /var/run/ld-elf32.so.hints is used on FreeBSD 64bit multilib
This fixes #125 .
2017-04-10 10:15:28 -05:00
William Hubbs
cc51bdca3b
Add attribution to openrc-init.c and openrc-shutdown.c
2017-04-07 07:39:12 -05:00
William Hubbs
13ca79856e
add init process
...
openrc-init.c and openrc-shutdown.c are based on code which was written by
James Hammons <jlhamm@acm.org >, so I would like to publically
thank him for his work.
2017-04-06 17:13:59 -05:00
i.Dark_Templar
79a9edc730
Fix make install on FreeBSD: don't try to install /etc/init.d/modules twice
2017-04-05 16:54:53 +03:00
Austin English
9eb669591e
start-stop-daemon: warn if calling --start with --retry or --stop with --wait
...
This fixes #122
2017-04-03 10:43:40 -05:00
William Hubbs
55a87a30ec
init.d/agetty.in: add -prefix keyword
2017-03-31 16:21:28 -05:00
William Hubbs
a912029462
init.d/mount-ro: change dependency on killprocs and savecache to after
...
killprocs always succeeds and savecache is not required by mount-ro, so
we can just start after both of these have run.
2017-03-31 13:39:42 -05:00
William Hubbs
1e90782797
agetty-guide: typo fix
2017-03-31 10:34:41 -05:00
William Hubbs
51a292e09b
init.d: add agetty to ignore patterns
2017-03-28 17:52:53 -05:00
William Hubbs
50fccf47d4
sh/gendepends.sh.in: fix detection of service scripts
...
We do not need to care about the path on the shebang line of a service
script as long as the shebang line ends with "openrc-run".
This fixes #119 and #120 .
2017-03-23 13:17:11 -05:00
William Hubbs
9bd63b5d4a
update dependencies for clock service
...
The clock services had a very long list of "before" dependencies that
referred to other services within OpenRC. For ease of maintenance,
convert these to "after clock" dependencies in the individual services.
2017-03-16 10:16:39 -05:00
William Hubbs
48db17a93f
update news file
2017-03-15 17:30:23 -05:00
William Hubbs
c333707cba
Remove all occurances of 'before *' from dependencies
...
Using wildcards in dependencies causes issues when rc_parallel is set to
yes because it can lead to deadlocks.
All dependencies need to be explicit rather than implicit.
This is the first stage of moving this direction.
2017-03-14 18:04:31 -05:00
William Hubbs
5f5b1f7cbe
init.d/sysfs.in: efivarfs tweaks
...
Since we check for /sys/firmware/efi/efivars, we do not need to check
for /sys/firmware/efi
Since Failing to mount efivarfs is not critical, we silence the error
message from mount.
2017-03-12 13:55:49 -05:00
William Hubbs
cfdf56475e
version 0.25
2017-03-12 13:55:25 -05:00
William Hubbs
fde3902d06
update ChangeLog
2017-03-09 16:20:17 -06:00
William Hubbs
d7bbb0f583
add agetty service
...
The agetty service is an alternate way to manage gettys with agetty
under Linux which is separate from an external init system.
2017-03-09 15:23:02 -06:00
William Hubbs
21ca2b746c
init.d/sysfs: drop modules completely from the dependencies
...
This is for #112 .
2017-03-08 10:44:10 -06:00
William Hubbs
6a79aef015
init.d/sysfs: Do not load efivarfs module
...
My understanding is that the kernel can autoload this module. If it
doesn't, the module should be built in or loaded from an initramfs.
This fixes https://github.com/openrc/openrc/pulls/112 .
2017-03-07 17:49:42 -06:00
William Hubbs
4a269674b7
make sure netmount and localmount start after root
2017-02-28 17:44:06 -06:00
William Hubbs
eea4decdd1
net-online: typo fix
2017-02-26 19:09:56 -06:00
William Hubbs
d4d0f25a48
net-online: updates to make the service more usable
...
- switch from attempting to ping the default gateway to a host outside
the local network, defaulting to google.com.
- along with this, change the name of the variable that requests a ping
test to include_ping_test so the meaning is more clear.
2017-02-26 13:51:50 -06:00
William Hubbs
1cb44092fc
sh/rc-functions.sh.in: add get_bootparam_value function
2017-02-23 18:16:15 -06:00
William Hubbs
4207e46622
move init.d examples under support and install them
2017-02-22 14:45:16 -06:00
William Hubbs
f6ea16159e
scripts: make sure the rc-sstat symlink is always replaced
2017-02-22 14:25:02 -06:00
William Hubbs
9047ea4cb0
install support files
...
These files have been in the distribution for some time but haven't been
installed. They are good examples of how to do things, so we should
install them.
2017-02-18 15:52:28 -06:00
William Hubbs
d7f5a696c1
support: rename all README files to README.md
2017-02-17 12:29:11 -06:00
William Hubbs
6f614cd3f3
Move deptree2dot to the support folder
...
Since deptree2dot and the perl requirement are completely optional, we
can move this tool to the support folder. This gives the user the option
of using it if they have perl installed, and means we do not have an
optional runtime dependency on perl.
Documentation for this tool has also been added to the support folder.
X-Gentoo-Bug: 600742
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=600742
2017-02-17 12:06:03 -06:00
William Pitcock
85c1930acf
test/setup_env: ensure that eval_ecolors is available on the path.
...
The test environment previously used the system default paths instead of installing the necessary $PATH environment
variable to make finding eval_ecolors work.
This closes #117 .
X-Gentoo-Bug: 374191.
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=374191 .
2017-01-31 17:27:13 -06:00
Nicolas Porcel
96bd0c004c
Fix typo in guide.md
...
This fixes #115 .
2017-01-26 17:07:01 -06:00
William Hubbs
b693af9055
Revert "scripts: do not substitute for @SHELL@ in rc-sstat"
...
This reverts commit e2e652e469 .
2017-01-26 15:39:19 -06:00
Doug Freed
6dcb692986
start-stop-daemon: allow all standard signals
...
Also we define the signalpair_item macro.
This fixes #113 .
X-Gentoo-Bug: 604986
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604986
2017-01-25 17:48:52 -06:00
William Hubbs
e2e652e469
scripts: do not substitute for @SHELL@ in rc-sstat
2017-01-08 20:42:26 -06:00
William Hubbs
b73941f0c3
mountinfo: make the path to /proc/mounts a constant
...
This path should not be hard coded in the open call.
Linux prior to 2.4.19 did not have /proc/self/mounts, so for now I'm
making this value /proc/mounts everywhere, but that may change to
/proc/self/mounts on linux; I'm not sure we should care about <2.4.19.
X-Gentoo-Bug: 604646
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604646
2017-01-04 18:18:37 -06:00
Benda Xu
c304522131
Clean up warnings that can use the _unused macro
...
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
2017-01-04 17:18:35 -06:00
Benda Xu
92325b44ba
Indentation fixes
...
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
2017-01-04 16:59:38 -06:00
Benda Xu
074d90f5a4
Drop the use of the _BSD_SOURCE macro on Linux
...
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
2017-01-04 16:59:24 -06:00
Benda Xu
7056b56b3c
Drop the use of the _BSD_SOURCE macro on GNU/Hurd
...
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
2017-01-04 16:58:52 -06:00
Doug Freed
d5c3b85e3f
loopback: drop explicit route for BSD too
2016-12-21 18:00:02 +00:00
William Hubbs
1ab2249448
version 0.24
2016-12-21 11:50:22 -06:00
William Hubbs
a15cff21c6
update ChangeLog
2016-12-20 12:34:22 -06:00
Doug Freed
45aa36cc62
librc: detect loops in stacked runlevels and abort
...
This fixes #109 .
X-Gentoo-Bug: 558700
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=558700
2016-12-19 18:24:31 -06:00
William Hubbs
d3f833179b
sh/init.sh.Linux.in: remove unused check for Gnu/KFreeBSD
...
This script only runs on Linux, so the check will always be false.
2016-12-18 11:53:12 -06:00
William Hubbs
abe552b969
modules: get rid of printing each module on Linux
...
Now that we respect the module blacklists, don't print every module we
try to load, because it might not end up loaded due to the blacklist,
and modprobe doesn't consider that a failure.
2016-12-17 19:21:13 -06:00
Doug Freed
856eafb006
sh/init.sh.Linux.in: skip /proc test if no md5sum
...
This will also warn users if md5sum is missing, which serves as a pretty
good indicator that /usr is not mounted.
2016-12-17 23:27:37 +00:00
Robin H. Johnson
f27d60add9
sh/openrc-run.sh: expose default start/stop/status
...
Supervisor setups break easily when start/stop/status functions are not
default.
Applications that write multiple PIDs to a pidfile (eg HAProxy as
described in bug 601540), can also benefit from being able to call the
default start/stop/status with modified environment variables.
Expose the default start/stop/status functions as
default_start/stop/status, and use them for the defaults
start/stop/status.
Trivial usage example:
```
stop()
{
t=$(mktemp)
for pid in $(cat $pidfile) ; do
echo $pid >$t
pidfile=$t default_stop
done
rm -f $t
}
```
X-Gentoo-Bug: 601540
X-Gentoo-Bug-URL: https://bugs.gentoo.org/601540
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org >
2016-12-17 14:50:11 -08:00
Doug Freed
8ad460c54c
Fix typos
...
Fixes #99
2016-12-17 18:41:02 +00:00
Doug Freed
72c0824961
localmount: add comment about types variable
2016-12-17 18:39:53 +00:00
Alan Somers
5b7e3490ef
Localmount shouldn't mount remote filesystems
...
The /etc/init.d/localmount script has a syntax error that causes it to
attempt to mount remote filesystems, causing the boot to fail. The
script appends a "no" to each remote filesystem type, but it should only
be append the "no" to the beginning of the list. This patch fixes
localmount on FreeBSD 12.0. A review of the mount(8) manpage on Ubuntu
12.04 suggests that this patch is correct for Linux, too.
2016-12-17 13:35:58 -05:00
William Hubbs
dd61e6bfc3
rc.conf: fix the commented default setting for rc_logger
...
X-Gentoo-Bug: 601480
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=601480
2016-12-15 17:52:34 -06:00
Doug Freed
204971c6e2
runlevels: remove bad trailing backslash
2016-12-12 15:13:26 -05:00
William Hubbs
3552f0ae54
man/start-stop-daemon.8: clarify documentation about --pidfile option
...
The documentation implied that if you stop a daemon we handle multiple
pids in a pid file. This is not correct. We only handle the first pid.
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=601540
2016-12-05 12:25:52 -06:00
AndCycle
42cb848829
fix manual typo
...
This fixes #105 .
2016-12-02 10:57:10 -06:00
William Hubbs
e0ac661419
split tmpfiles processing into opentmpfiles
...
The openntmpfiles package is designed so that it can be used on systems
independently of whether openrc is used.
2016-12-01 12:04:54 -06:00
Jason Zaman
6414c3bc39
selinux: fix SIGSEGV with invalid contexts
...
Fixes: https://github.com/openrc/openrc/issues/104
2016-11-17 12:03:12 -06:00
William Hubbs
4f9bd7e4db
init.d/loopback.in: drop the route to the loopback interface on Linux
...
This is related to #103 .
2016-11-03 12:47:01 -05:00
William Hubbs
bf539f2196
init.d/mount-ro: do not remount /usr read only if it is premounted
...
X-Gentoo-Bug: 573760
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573760
2016-11-03 12:29:21 -05:00
William Hubbs
20b60ea904
conf.d/net-online: clarify comment about interfaces setting
...
This setting refers to all interfaces that support ethernet
2016-11-03 11:57:40 -05:00
William Hubbs
f53c8baef3
init.d/net-online: remove interfaces and timeout from local declarations
...
X-Gentoo-Bug: 598621
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=598621
2016-11-03 11:18:20 -05:00
William Hubbs
be06cd250e
src/rc/rc: do not try to start services if fork fails
2016-11-01 17:31:57 -05:00
Robin H. Johnson
003657c973
init.d/loopback: drop scope on loopback
...
Busybox does not support the 'scope' argument on 'ip address add' or 'ip
route add', this is documented in BUSYBOX.md, but is no longer actually
needed, as the kernel does get it right without manual specification,
and the ifconfig variant already relies on the kernel to get it right.
This is part of #103 .
X-Gentoo-Bug: 487208
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487208
2016-10-25 10:49:14 -05:00
William Hubbs
4fd144c0a6
src/rc/rc-misc.c: report error if call to flock() fails
...
X-Gentoo-Bug: 597390
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=597390
2016-10-24 12:47:49 -05:00
Joe Maloney
c44c904a61
init.d.misc/wpa_supplicant: find wireless interface for FreeBSD
...
This fixes #101 .
2016-10-16 11:10:57 -05:00
Sven Wegener
78146b0e14
do_service: Initialize idx to 0
...
If index is not explicitly specified for service_started_daemon, it will
look for daemons by random index.
This fixes #100 .
2016-10-11 10:30:02 -05:00
William Hubbs
deaae7ab5c
init.d/sysfs: load efivarfs module when booting in efi mode:1
...
The presence of /sys/firmware/efi is used to indicate that the system
was booted in efi mode.
2016-10-05 22:48:17 -05:00
William Hubbs
3d2c2f0b87
init.d/sysfs: fix efivarfs module test
2016-10-04 18:18:17 -05:00
William Hubbs
6a0c033a64
init.d/sysfs: fix efivarfs handling
...
Separate loading the module, if it isn't built in or loaded, from
mounting the file system.
This also makes sure the warning about configuring the module in
/etc/conf.d/modules or building it in is displayed only if it is loaded
successfully.
X-Gentoo-Bug: 595836
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=595836
2016-10-04 12:06:58 -05:00
Doug Freed
6710316a18
openrc-run: fix double free
2016-09-30 17:29:56 -04:00
Doug Freed
61882821e0
init.d: Clean up some bad ewarn output
2016-09-28 15:00:40 -04:00
William Hubbs
969546bcf0
typo fix
...
X-Gentoo-Bug: 595306
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=595306
2016-09-27 19:39:02 -05:00
William Hubbs
d0ae7ffc25
version 0.23
2016-09-27 19:38:07 -05:00
William Hubbs
b71bcc2422
update ChangeLog
2016-09-27 12:24:40 -05:00
William Hubbs
24010dcb48
dist: convert to tar.gz
...
This allows the "make dist" target to be used as well as the github
archive generation.
2016-09-23 15:28:56 -05:00
William Hubbs
0a76627345
init.d/swap: remove the case for linux
...
I am removing the separate case for Linux, because we are droppping the
"-e" switch.
2016-09-23 14:17:14 -05:00
William Hubbs
bbf98befb8
sh/init.sh.Linux.in: update test for live /proc to use md5sum
...
This allows us to avoid the warnings from bash-4.4 about null bytes in
command substitutions.
If you have separate /usr, are not using an initramfs, and have a file
called /proc/self/environ on your root file system, this will break.
X-Gentoo-Bug: 594534
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=594534
2016-09-22 17:37:09 -05:00
William Hubbs
316903fbf0
man/openrc-run.8: typo fix
2016-09-22 10:30:41 -05:00
William Hubbs
66a9788435
man/openrc-run.8: Add note about eval usage
...
This fixes #77 .
2016-09-21 13:33:39 -05:00
William Hubbs
bf73363f22
Add --use-blacklist to modprobe calls in modules and modules-load
...
This means that we will honor the modprobe black lists.
X-Gentoo-Bug: 594012
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=594012
2016-09-20 13:15:39 -05:00
William Hubbs
d6c30ab12a
Revert "Remove eval calls from supervisor start functions"
...
This reverts commit 0d1f1010c2 .
We need the eval in case someone uses something like:
command_args="this \"is a\" test"
This is related to #77 .
2016-09-20 11:33:56 -05:00
William Hubbs
0d1f1010c2
Remove eval calls from supervisor start functions
...
This fixes #77 .
2016-09-19 18:03:57 -05:00
William Hubbs
83bb827edf
Revert "Disable parallel startup in interactive mode"
...
This reverts commit 8b4fc05ff2 .
The original commit did not explain why this feature was disabled, and I
now have a request to enable it.
This fixes #24 .
2016-09-19 12:09:05 -05:00
William Hubbs
c146b96691
Add command_progress variable
...
If this is set to yes, 1, true, or on, start-stop-daemon will display a
progress meter while waiting for a daemon to stop.
2016-09-16 14:23:09 -05:00
Doug Freed
6cabaf274d
rc-misc: allow EINFO_VERBOSE through too
2016-09-16 09:51:03 -04:00
Doug Freed
1edb5f6fd9
rc-misc: Allow EINFO_COLOR through env_filter()
...
This allows rc-service -C <service> <action> to properly not print color
messages.
Fixes #93
2016-09-14 22:48:56 -04:00
William Hubbs
c4d7e02abd
Fix permission checks for cgroups
...
This is needed because containers may give read access to cgroups but
not allow the settings to be changed.
2016-09-14 12:34:42 -05:00
William Hubbs
a4e0d675e1
man/openrc-run.8: update variable documentation
...
- document command_args_background and command_user.r
- clarify documentation for command_background
This fixes #78 .
2016-09-13 14:02:10 -05:00
William Hubbs
8a8032478a
Make use of name vs RC_SVCNAME consistent in supervisor scripts
...
This fixes #79 .
2016-09-13 12:52:10 -05:00
William Hubbs
ac53c9a658
sh/init.sh: fix the test for cache restoration
...
This fixes the test for cache restoration since we are no longer caching
the dependency tree.
2016-09-12 12:58:31 -05:00
William Hubbs
b02ff466fa
savecache: stop saving the dependency tree
...
This fixes #85 .
2016-09-12 12:58:31 -05:00
William Hubbs
6bd0f2d096
init.d/procfs: typo fix
2016-09-12 12:58:01 -05:00
frickler01
63f8ae466f
Format code blocks and variable/path notations
...
Add markdown backticks for commands, variable names and path as well
as code blocks for better readability.
This fixes #97 .
2016-09-08 19:27:47 -05:00
William Hubbs
841b883825
hwclock: fix module load warning
2016-09-08 13:36:13 -05:00
William Hubbs
ba10793b0b
init.d/procfs: fix binfmt_misc module load warning
...
This reworks the logic so that the warning about configuring the
binfmt_misc module is only displayed if the module actually has to be
loaded.
2016-09-08 11:53:20 -05:00
William Hubbs
d4d5593238
sh/openrc-run.sh: read global configuration settings first
...
X-Gentoo-Bug: 503134
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=503134
2016-09-06 13:34:25 -05:00
William Hubbs
d5db5489be
init.d/swap: do not unmount all tmpfs file systems
...
X-Gentoo-Bug: 568162
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=568162
2016-09-05 13:39:51 -05:00
William Hubbs
d06db93d59
remove swapfiles service
...
The swapfiles service was basically a copy of the swap service, so this
commit consolidates the functionality into the swap service.
X-Funtoo-Bug-URL: https://bugs.funtoo.org/browse/FL-2523
X-Gentoo-Bug: 568162
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=568162
2016-09-05 13:39:51 -05:00
Martin Väth
8c14d0c476
Fix typo in RC_UNAME check of modules-load
...
The $RC_UNAME "Linux" had been misspelled as "linux".
As a consequence, entries in e.g. /etc/modules-load.d failed to
load any module succesfully under Linux(!)
2016-08-30 19:47:13 +02:00
William Hubbs
04debf6f25
another news typo fix
2016-08-30 09:15:34 -05:00
Doug Freed
c289774b00
modules-load: handle comments better
...
This handles comments without a trailing space after the comment
character.
Reported-By: josef64
2016-08-26 15:23:54 -04:00
William Hubbs
9dd8ee330d
typo fix
2016-08-25 21:05:45 -05:00
William Hubbs
5d5856c193
Update news file
...
Add information on modules-load service and more explanation about
dealing with the rc -> openrc and runscript -> openrc-run transitions.
2016-08-25 17:33:04 -05:00
William Hubbs
686e172207
init.d: add modules-load to ignore patterns
2016-08-25 17:04:06 -05:00
William Hubbs
fef6268f8d
modules-load.d: cleanups
...
Move list of directories to a local variable and create the fn variable
to use for an individual file name rather than using path.
2016-08-25 16:12:33 -05:00
William Hubbs
556dbff99d
Add modules-load.d support
2016-08-25 12:08:44 -05:00
William Hubbs
69ac78d76a
openrc-run: make runscript warning respect quiet option
...
X-Gentoo-Bug: 591414
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=591414
2016-08-25 11:04:48 -05:00
William Hubbs
4018dfc8de
init.d/hostname: do not use localhost as a default hostname
...
This allows the operating system default hostname to be used if no
hostname is configured.
2016-08-24 13:43:11 -05:00
William Hubbs
353bb9bc9a
init.d/hostname: add support for /etc/hostname
2016-08-23 13:22:19 -05:00
William Hubbs
73cdf10f1f
Deprecate automatic loading of modules
...
In the hwclock, procfs and sysfs service scripts, we automatically
attempt to load the kernel modules we need before we take any action. We
shouldn't do this, because there are systems which do not use kernel
modules and do not have the kmod package installed.
With this change, we continue to load the modules ourselves, but we warn
the admin that they need to be added to /etc/conf.d/modules or built
into the kernel.
In the future, this automatic loading will be dropped.
X-Gentoo-Bug: 342313
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=342313
2016-08-19 11:08:27 -05:00
Raymond Jennings
1a55d46645
local.d/README: typo fix
...
X-Gentoo-Bug: 591258
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=591258
2016-08-15 13:47:06 -05:00
William Hubbs
cae3976ef1
init.d: Add runsvdir to ignore patterns
2016-07-31 14:02:30 -05:00
William Hubbs
da28a3d367
init.d: initial service adjustments for docker support
...
Add -docker keyword to the same scripts that have -lxc keyword.
2016-07-31 13:01:17 -05:00
William Hubbs
ca8c29ee60
librc: fix Docker auto detection
...
The original auto detection of Docker containers assumed the presence of
a container environment variable. However, Docker-1.12 does not
implement this, and I'm not sure which versions of docker implemented
it.
The new test is for the presence of a file named .dockerenv in the
root directory.
2016-07-31 12:24:56 -05:00
William Hubbs
f62253b833
Add support for runit
...
X-Gentoo-Bug: 501364
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=501364
2016-07-27 16:26:26 -05:00
William Hubbs
f2c2e2dd5a
init.d/sysctl.in: typo fix
2016-07-27 14:09:24 -05:00
Kenneth Lakin
94b98430cb
start-stop-daemon: Add SSD_IONICELEVEL
...
This is the disk IO counterpart to SSD_NICELEVEL.
Modified by William Hubbs to add the variable to the start-stop-daemon
man page.
This fixes #69 .
2016-07-26 12:30:39 -05:00
William Hubbs
b19d0a40d7
init.d/loopback: remove unnecessary stop function
2016-07-26 11:14:50 -05:00
Martin Väth
0c229faf7e
tmpfiles.sh: Support lines with q Q h H
...
btrfs support is not implemented yet (for q Q v), but at least tmpfiles.sh
no longer chokes about tmpfiles.d lines of recent systemd versions
This fixes #87 .
2016-07-26 10:53:54 -05:00
Mike Gilbert
3092e310ac
tmpfiles: Accept filenames as command line arguments
...
This brings us closer to being able to use tmpfiles.sh as a full
replacement for systemd-tmpfiles.
This closes #83 .
2016-07-25 15:37:18 -05:00
Mike Gilbert
671911762d
tmpfiles: Process command line before gathering config files
...
This is part of #83 .
2016-07-25 15:37:02 -05:00
Mike Gilbert
7d68839e9e
tmpfiles: Make unrecognized options fatal
...
This is part of #83 .
2016-07-25 15:36:44 -05:00
Jakub Jirutka
5341a925c1
s6-guide: fix typo
...
This fixes #92 .
2016-07-25 13:52:38 -05:00
Doug Freed
3adb8fb389
rc-logger: refuse to cat TMPLOG into itself
...
This prevents an infinite loop in case somebody decides to set
rc_log_path to match TMPLOG.
2016-07-24 02:27:53 +00:00
William Hubbs
8927a37fb7
etc: remove rc.conf.* file fragments
2016-07-20 15:38:36 -05:00
William Hubbs
b085b2cda5
etc: create default rc.conf
...
Before now, /etc/rc.conf was created by the build system from multiple
rc.conf.* file fragments and there was no reason for this.
2016-07-20 15:37:50 -05:00
William Hubbs
daf9397764
init.d: combine sysctl scripts
...
We had separate sysctl scripts for each operating system. However, there
is no need to do this since we can detect the operating system at
runtime with $RC_UNAME.
2016-07-19 16:21:48 -05:00
William Hubbs
2984504c88
conf.d: remove staticroute file fragments
2016-07-19 11:46:55 -05:00
William Hubbs
35e8386c24
conf.d: makestaticroute file static
2016-07-19 11:46:55 -05:00
William Hubbs
2108285d64
conf.d: remove network file fragnents
2016-07-19 11:46:30 -05:00
William Hubbs
a3133fec25
conf.d: make network file static
2016-07-19 11:46:04 -05:00
William Hubbs
314ae3dc78
modules: add support for FreeBSD
...
This is based on a patch submitted by
Joe Maloney <pkgdemonteam@gmail.com >.
This fixes #91 .
2016-07-18 17:09:41 -05:00
William Hubbs
695be59083
rc-status: add -m/--manual option to show manually started services
...
X-Gentoo-Bug: 585906
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=585906
2016-07-18 13:20:56 -05:00
Doug Freed
c962678dd6
rc: Rename some static variables to kill warnings
2016-07-16 20:10:37 +00:00
William Hubbs
3a1262703f
Remove the DEBUG_MEMORY macro
...
This fixes #43 .
2016-07-14 16:52:57 -05:00
William Hubbs
20035210bd
make variable aflag a boolean show_all
2016-07-14 12:13:17 -05:00
Jaromil
7f84b5d741
libeinfo: document the x suffix on function names
...
This fixes #88 .
2016-07-13 17:04:28 -05:00
Julian Ospald
8bca2cd4b3
Build: fix hardcoded pkg-config invocation
...
This fixes #89 .
2016-07-13 16:52:05 -05:00
William Hubbs
ac8ad169ae
hwclock: always use --noadjfile if available
...
When we use the --utc or --localtime switch, also use --noadjfile if it
is available. This means hwclock will not use a drift file.
X-Gentoo-Bug: 584722
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=584722
2016-07-06 10:40:31 -05:00
Mike Gilbert
5537994002
man: Document the procname variable for openrc-run
...
X-Gentoo-Bug: 586794
X-Gentoo-Bug-URL: https://bugs.gentoo.org/586794
2016-06-23 17:46:11 -05:00
Benda Xu
5af5d12f3e
Fix PATH for Prefix.
...
1. remove default /bin:/sbin:/usr/bin:/usr/sbin
2. PKG_PREFIX should be defaulted to $(PREFIX)/usr
3. LOCAL_PREFIX should be defaulted to $(PREFIX)/usr/local
X-Gentoo-Bug:583634
X-Gentoo-Bug-URL:https://bugs.gentoo.org/show_bug.cgi?id=583634
2016-06-13 17:43:36 -05:00
William Hubbs
b2c92b88cc
fstabinfo/mountinfo: ensure /etc/fstab exists before calling setmntent
...
This is based on a patch by A. Wilcox <awilfox.gentoo@foxkit.us >.
X-Gentoo-Bug: 478226
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478226
X-Gentoo-Bug: 478226
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478226
2016-06-10 17:16:37 -05:00
William Hubbs
1b32af1722
increment version to 0.22
2016-06-10 16:02:25 -05:00
William Hubbs
5bfb7d6c77
Update ChangeLog
2016-05-24 14:02:35 -05:00
William Hubbs
12c8248b5f
update news for 0.21
2016-05-24 13:06:29 -05:00
William Hubbs
820ef6dab6
supervise-daemon: clarify documentation about configuring daemon not to fork
2016-05-24 12:55:50 -05:00
William Hubbs
87884db667
Make deprecation warnings for rc and runscript more visible
...
These warnings were inserted in verbose only mode in OpenRC-0.13.A
Now, we are making them more visible in preparation for removing these
compatibility binaries in the future.
2016-05-24 11:24:10 -05:00
William Hubbs
94077d264e
supervise-daemon: log the exit code or signal when a child process dies
2016-05-23 11:10:51 -05:00
William Hubbs
3351c8b4c3
supervise-daemon.sh: add support for chroot variable
2016-05-19 17:59:40 -05:00
William Hubbs
a8214af2fe
start-stop-daemon.sh: fix regression in chroot support
...
The support for the chroot variable was broken in 0.16, this fixes that
breakage.
2016-05-19 17:58:14 -05:00
William Hubbs
9a372812c7
guide.md: typo fix
...
This fixes #86 .
2016-05-19 13:36:43 -05:00
Jason Zaman
3fa9015b8e
rc-selinux: access check was backwards
2016-05-13 12:52:21 -05:00
William Hubbs
3b5a8b331e
supervise-daemon: add pam service file
2016-05-13 12:05:23 -05:00
Anthony G. Basile
b3a04e797e
runlevels/Makefile: add support for runlevel ‘nonetwork’
...
Traditional System V reserves runlevel 2 for multiuser with no
networking. We add support for this which is already defined in
the inittab as
l2:2:wait:/sbin/rc nonetwork
X-Gentoo-Bug: 533828
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=533828
Signed-off-by: Anthony G. Basile <blueness@gentoo.org >
2016-05-12 17:49:56 -04:00
William Hubbs
92e2f2c7cc
killprocs: remove calls to sleep
...
X-Gentoo-Bug: 487084
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487084
2016-05-05 17:02:39 -05:00
William Hubbs
ad23d5b8db
openrc-run: clean up runscript deprecation message
2016-05-04 18:17:58 -05:00
William Hubbs
62410eaf4b
add daemon supervisor
...
The supervise-daemon process is meant to be a lightweight supervisor
which can monitor and restart a daemon if it crashes.
2016-04-27 11:13:50 -05:00
William Hubbs
fd80b6fc67
localmount/netmount: clean up critical mount processing
...
Fix a typo and do not fail if a path in critical_mounts is not listed as
a critical mount does not get mounted.
2016-04-26 12:43:50 -05:00
William Hubbs
5d130cc45c
localmount/netmount: allow mount points to be marked critical
...
In previous releases, we either treated no mount points as critical or
all of them.
Now both localmount and netmount support a critical_mounts setting. If
mount points listed in this setting fail to mount, localmount and
netmount will fail.
2016-04-25 12:04:34 -05:00
William Hubbs
1c3c2cf6d8
netmount: fix mounting on Linux
...
Before this commit, on Linux, we were always trying to mount file
systems marked with _netdev, even when the previous mount command
failed. Now, we do not run the second mount if the first fails.
X-Gentoo-Bug: 579876
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=579876
2016-04-15 11:30:44 -05:00
Mike Gilbert
171e856ec8
start-stop-daemon: Allow group read/write when creating output files
...
This allows for better interaction with inherited ACL entries.
This fixes #84 .
X-Gentoo-Bug: 577362
X-Gentoo-Bug-URL: https://bugs.gentoo.org/577362
2016-04-11 11:11:59 -05:00
Dustin C. Hatch
beaa71df0a
binfmt.sh: use read in raw mode
...
The read builtin in most shells will interpret backslash characters
as escapes, and they are lost when reading binfmt files line-by-line.
This causes magic strings containing backslashes to be mangled and
become invalid, resulting in erroneous 'invalid entry' messages.
The -r option to read disables special handling of backslashes and
keeps all lines intact.
X-Gentoo-Bug: 575114
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=575114
2016-02-19 15:25:53 -06:00
William Hubbs
7eaf71176b
Fix rc_env_allow wildcard usage
...
Before this commit, using * in rc_env_allow did not work.
This fixes #60 .
2016-02-12 12:44:52 -06:00
Mike Frysinger
2c1f6a16e1
sysfs: mount pstore when available
2016-02-09 15:39:43 -06:00
Patrick Lauer
e82653782e
Add a basic OpenRC users guide
...
X-Gentoo-Bug: 513024
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=513024
2016-02-09 15:30:46 -06:00
William Hubbs
e52b5f59c2
savecache: stop saving nettree
...
Netifrc is no longer part of OpenRC, so we shouldn't save its dep tree
as part of savecache.
This should have been removed when netifrc was split out. also, it
might be related to the following bug.
X-Gentoo-Bug: 563720
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=563720
2016-01-28 17:06:25 -06:00
William Hubbs
8a7e4d38a7
rc-service: add --ifinactive and --ifnotstarted flags
...
X-Gentoo-Bug: 523174
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523174
2016-01-28 12:57:11 -06:00
William Hubbs
47dd5e37cb
add back deprecation warnings lost during refactoring
2016-01-22 12:46:29 -06:00
William Hubbs
e277ae57ef
fix tests
...
X-Gentoo-Bug: 572602
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572602
2016-01-22 12:07:13 -06:00
William Hubbs
69f052b611
librc: Complain when a real and virtual service have the same name
2016-01-21 15:58:03 -06:00
William Hubbs
e4eacf02ca
openrc-run: in verbose mode, log execution of the shell script
...
This is to show when openrc-run runs the openrc-run.sh script; it is
used for debugging.
2016-01-20 11:20:40 -06:00
Colin Booth
30c3561b6b
sh/s6.sh: update s6-svc syntax to be valid for 2.2.0.0+
...
The s6-svc syntax changed for wait-up, wait-ready, wait-down, and
wait-finished. This changes the s6 handling script to use the current
valid syntax.
This fixes #65 .
2016-01-19 16:52:58 -06:00
Manuel Rüger
5f2850366e
Fix typo
...
This fixes #70 .
2016-01-19 16:30:41 -06:00
Gokturk Yuksek
1cb7eec31f
conf.d/bootmisc: typo fix: s/dmesc/dmesg/
...
This fixes #72 .
2016-01-19 16:22:34 -06:00
William Hubbs
cd7883d25d
localmount: Allow users to control whether errors are ignored
...
X-Gentoo-Bug: 572138
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572138
2016-01-19 13:34:04 -06:00
Doug Freed
62b49b2a3a
rc: remove use of magic constant and allow OpenVZ to drop to shell
...
OpenVZ has had console support for a long time now; allow them to use it
to drop to a shell during interactive boot.
2016-01-19 00:09:20 -06:00
Doug Freed
4c814a0a28
librc: handle rc_sys="prefix" even if we weren't built with a prefix
...
This probably isn't needed, but it mimics old behavior.
2016-01-19 00:09:20 -06:00
Doug Freed
36dde4e7f2
librc: fix handling the nothing special case for rc_sys
2016-01-19 00:09:20 -06:00
Doug Freed
649f63d882
librc: move system detection code into rc_sys and use it
...
This fixes an issue where librc code was calling code that only existed
in the rc binary.
This reverts commits 8addd79 and 9f6e056
This fixes #75 .
2016-01-19 00:09:20 -06:00
William Hubbs
55a28f5d25
Revert "rc: make get_systype similar to the old rc_sys function"
...
This reverts commit f79a7a7be1 .
2016-01-18 23:40:20 -06:00
William Hubbs
6c09421375
Revert "librc: fix librc-depend functions to call rc_sys"
...
This reverts commit 73482cf13a .
2016-01-18 23:40:03 -06:00
William Hubbs
79359f77cc
fix bsd build
...
X-Gentoo-Bug: 572068
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572068
2016-01-18 16:06:39 -06:00
William Hubbs
f79a7a7be1
rc: make get_systype similar to the old rc_sys function
2016-01-18 15:50:59 -06:00
William Hubbs
73482cf13a
librc: fix librc-depend functions to call rc_sys
2016-01-18 15:09:31 -06:00
William Hubbs
0910c455d3
src/rc/Makefile: fix make depend target
2016-01-14 13:33:05 -06:00
William Hubbs
f5e06bc55a
include rc.h properly in source files
...
We were attempting to include rc.h in rc-misc.h instead of the source
files where it should be included.
2016-01-14 12:52:32 -06:00
William Hubbs
e7ae08c38d
version 0.21
2016-01-14 11:35:18 -06:00
William Hubbs
6da0abc085
fix selinux build
...
X-Gentoo-Bug: 571798
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=571798
2016-01-14 11:29:24 -06:00
William Hubbs
b34df9dd81
fix selinux build
2016-01-13 20:11:06 -06:00
William Hubbs
6f02069746
Add LANG, LC_MESSAGES and TERM to the environment whitelist
2016-01-13 19:34:22 -06:00
William Hubbs
d4c7207ef3
fix seg fault
2016-01-13 19:30:19 -06:00