William Hubbs
5615fa78d6
Drop restart_pre/restart_post
...
By design, restart is hard coded to run stop followed by start along
with all of the pre/post functions associated with them. Restart doesn't
need its own pre/post functions since it is possible to make any
function in an init script behave differently for a restart command by
testing against the RC_CMD environment variable.
2012-09-25 10:22:47 -05:00
William Hubbs
f007988fba
Clarify how to handle restart processing
...
The Gentoo developer manual covers how to handle restarts in init
scripts, but this was not officially covered in OpenRc's Documentation.
This commit adds an example to the runscript man page that shows how
this works.
2012-09-23 19:25:57 -05:00
Christian Ruppert
0406c6085b
Add restart_pre/restart_post support, also document RC_CMD
2012-09-22 16:57:46 +02:00
William Hubbs
5092595835
add RC_PREFIX environment variable
...
This will be used by init scripts which want to be able to run in a
Gentoo Prefix installation. RC_PREFIX will contain the prefix offset.
2012-09-09 22:22:15 -05:00
William Hubbs
e641b43849
Bring Back prefix support
...
We now have a team member who is interested in OpenRC on prefix, so I am
bringing it back to the main tree.
2012-07-26 10:54:48 -05:00
William Hubbs
eb11953dd2
Document the required_dirs and required_files variables
2012-03-24 12:40:45 -05:00
William Hubbs
9fa54a8e80
Runscript: allow extra_commands to be run in chroots
...
The commands defined in the extra_commands variable do not depend on
whether the service is stopped or started, so it is valid to run them in
chroot environments.
Also, add a note to the runscript man page about the commands in
extra_commands being able to run whether or not the service is started.
Reported-by: Robin Johnson <robbat2@gentoo.org>
X-Gentoo-Bug: 406713
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406713
2012-03-03 09:22:44 -06:00
William Hubbs
3247184d86
Remove prefix support
...
I spoke with the prefix team sometime back and was told that they do not
have an interest in using OpenRC on prefix systems.
2012-02-21 07:27:16 -06:00
William Hubbs
47c3b28459
Clarify the documentation about the reboot runlevel
...
The reboot runlevel does exist, but it gets remapped to the shutdown
runlevel internally.
2012-02-19 13:11:11 -06:00
William Hubbs
f18763bcd8
Document the RC_REBOOT variable
2012-02-19 12:49:53 -06:00
Christian Ruppert
7ea5c614d9
Add -W/--writable function to checkpath
...
Checkpath -W will use access(3p) to determine whether or not a path is
writable. This is more accurate than test(1p) because it also takes into
account whether or not the filesystem is mounted read-only.
Modified by William Hubbs to add the man page update.
2012-01-26 14:42:18 -06:00
Christian Ruppert
2990e5a2e3
Whitespace
2012-01-22 01:17:42 +01:00
Christian Ruppert
9c0edc5c52
Use the "--make-pidfile" when command_background is used
...
The start-stop-daemon "--make-pidfile" option is now used by default when using
command_background, this requires a pidfile to be specified.
Document command_background option.
Reported-by: Giampaolo Tomassoni <giampaolo@tomassoni.biz>
X-Gentoo-Bug: 399165
X-Gentoo-Bug-URL: https://bugs.gentoo.org/399165
2012-01-17 18:25:44 +01:00
Christian Ruppert
30a56cdb46
Add "ifstopped" command to runscript
...
Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
2012-01-15 02:10:35 +01:00
Robin H. Johnson
66f4305e1c
rc/checkpath: tmpfiles.d backend creation code
...
This commit provides the checkpath applet with feature parity to
systemd's tmpfiles.c create_item function.
Very similarly to the systemd function, it does NOT do any of the
cleanup work in this function.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-01-09 19:20:47 -08:00
William Hubbs
1771a83b92
Reword the documentation for the retry option for start-stop-daemon
2011-12-30 22:20:03 -06:00
William Hubbs
e873ef2ba7
Reword retry documentation on runscript man page
2011-12-30 22:12:59 -06:00
Christian Ruppert
26edfe369c
Fix the description of --retry in start-stop-daemon(8)
...
X-Gentoo-Bug: 368615
X-Gentoo-Bug-URL: https://bugs.gentoo.org/368615
Reported-by: Stuart Shelton <srcshelton@gmail.com>
2011-12-31 03:43:25 +01:00
Christian Ruppert
fb8db18d79
Add "retry" option for the stop() template
2011-12-31 02:41:59 +01:00
William Hubbs
810f2e55fb
Documentation updates
...
- Clarify that start_stop_daemon_args is only used when starting a
daemon.
- fix several typos.
2011-12-30 10:35:16 -06:00
Christian Ruppert
191ea10f86
Document start_stop_daemon_args
2011-12-30 16:03:24 +01:00
William Hubbs
5e01051c4e
Allow init scripts to be executed with a relative path
...
This was a regression that was caused by the fix for
http://bugs.gentoo.org/show_bug.cgi?id=350910 . I am reverting the commit
that we said fixed that bug and re-opening it.
Reported-By: Nathaniel <nathaniel@paust.us
X-Gentoo-Bug: 392457
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=392457
2011-12-11 01:18:08 -06:00
Mike Frysinger
ef1ff1b4f2
make shell math operations style more succulent
...
Convert the style:
var=$((${var} + 1))
to:
: $(( var += 1 ))
The latter is easier to read imo.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-19 02:25:36 -05:00
William Hubbs
5b1aaf8cc8
add support for extra_stopped_commands
2011-11-16 13:56:55 -06:00
William Hubbs
4ee62c7903
Libeinfo: do not suppress ewarn() messages
...
The ewarn() function was affected by the EINFO_QUIET environment
variable which lead to warning messages being suppressed. Warnings
should not be suppressed.
Reported-by: Hanno Boeck <hanno@gentoo.org>
X-Gentoo-Bug: 380073
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=380073
2011-08-22 12:39:26 -05:00
William Hubbs
0c8bea2152
Improve processing of service directories and conf.d files
...
symbolic links should not be followed in an attempt to work out the name
of the service we are running. Also, @sysconfdir@/conf.d should be tried
as a backup directory for configuration files.
I would like to thank Robin Johnson for his input on this change.
X-Gentoo-Bug: 350910
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=350910
2011-07-31 10:00:48 -05:00
Mike Frysinger
d0bc4f20ad
drop useless "All rights reserved" notice
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-29 19:46:31 -04:00
William Hubbs
16f7e90c6c
clarify documentation for -timeout keyword
2011-04-08 14:08:29 -05:00
Robin H. Johnson
6a0812645a
Update manpage for mention of rc_sys purpose.
...
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-05 22:27:35 -08:00
Robin H. Johnson
6df531d33d
Document the order of the services within rc-status output.
2011-01-05 22:09:33 -08:00
Mike Frysinger
ecf9ef49a7
random spelling fixes
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-08 22:02:51 +00:00
Roy Marples
dc3ccd8101
start-stop-daemon can now set process IO scheduling.
2009-12-14 08:47:48 +00:00
Roy Marples
95ee39ab1c
Add support for Linux Containers, fixes #202 .
...
Patch by bug reporter.
2009-11-04 19:21:24 +00:00
William Hubbs
c96a015742
fix wait time for gentoo bug 288495
...
The wait time was in seconds. This patch converts it to milliseconds.
2009-10-15 20:25:01 +01:00
Roy Marples
44585fea46
Add -P to start-stop-daemon to display a . for each second elapsed.
...
Fixes #197 .
2009-09-04 15:41:08 +01:00
Roy Marples
b4104957b1
We should use -feature instead of nofeature.
...
This matches the ifconfig and Gentoo USE flag syntax and is hopefully
easier to read.
Fixes #178 .
2009-07-01 00:07:32 +01:00
Roy Marples
c09e6b3e6d
Typo
2009-05-02 12:31:13 +01:00
Roy Marples
6615eb4b68
Add runlevel stacking, #88
...
This implementation has the limitation that you cannot have a stacked
runlevel and service of the same name in a runlevel.
2009-05-02 12:26:45 +01:00
Roy Marples
658a220638
Add (c) to Copyright
2009-05-01 15:11:40 +01:00
Roy Marples
fb051bf81a
Add -i, --ifexists so that we can do this
...
rc-sercice -i foo -- restart
instead of this
rc-service -e foo && rc-service foo -- restart
2009-05-01 08:38:57 +01:00
Roy Marples
f689187966
Add -Z, --dry-run option to show which services we would start/stop
...
without actually doing so.
Fixes #151 .
2009-04-30 23:42:01 +01:00
Roy Marples
b70501ef45
Go back to git
2009-04-30 15:05:39 +01:00
Roy Marples
94b3057571
Add the noshutdown keyword to special case the shutdown.
2009-04-27 12:04:33 +00:00
Roy Marples
eaa32c75c9
Add the nostop keyword so that we don't stop the network init script by default.
2009-04-26 21:16:05 +00:00
Roy Marples
9966a902ab
rc-status -c now lists services that have crashed.
...
It returns 0 if there are crashed services, otherwise 1.
This it easy to restart crashed services automatically.
More for #120 .
2009-04-24 10:17:53 +00:00
Roy Marples
953b0b7435
Document -i, --interpreted flag.
2009-04-22 10:49:07 +00:00
Roy Marples
ee53e6ad29
-w, --wait seconds
...
New option so you can set the number of seconds to wait for and
check the daemon is still running.
The old code that periodically polled wasn't that reliable - in this
case simpler == better.
Fixes #160
2009-04-19 18:20:49 +00:00
Roy Marples
132dfd7b1e
Typo, thanks to Polynomial-C
2009-03-05 00:41:44 +00:00
Roy Marples
70d8c5beda
Typo, #150
...
Thanks to betelgeuse
2009-02-13 12:52:29 +00:00
Roy Marples
abcc4c5c72
Don't allow SYSVINIT parameters through anymore.
...
RC_REBOOT is now yes when rebooting.
Document the special reboot runlevel.
2009-01-13 11:02:00 +00:00
Roy Marples
3d37005a3d
We now warn about clock skews
...
rc-update -u will force a regen of the dep tree
rc_newer_than and rc_olderthan now take another two parameters for newest/oldest file and mtime
2009-01-12 23:53:13 +00:00
Roy Marples
631acff7aa
Document the --chuid option.
2009-01-01 14:32:09 +00:00
Roy Marples
1efa64cae8
Typo.
2008-12-30 19:08:51 +00:00
Roy Marples
38e6c9ba5c
make ignore now configures the sv:ignore property.
2008-12-04 12:38:23 +00:00
Roy Marples
03e8e0cb68
More Typos.
2008-11-04 14:28:51 +00:00
Roy Marples
5fc6f21169
Typo
2008-11-04 11:05:30 +00:00
Roy Marples
c520d4a23a
--nice is -N, not -n. Also, correct default timeout.
2008-11-03 21:11:29 +00:00
Roy Marples
0af7d5bc20
Add a new shutdown runlevel, Gentoo #224537 .
...
Split halt.sh into halt, killprocs, romount and savecache services.
The reboot runlevel is removed but mapped to shutdown.
The halt script should be moved to the sysvinit package.
2008-11-03 15:31:01 +00:00
Roy Marples
0d98d56188
Remove sysvinit specific code.
...
The runlevels shutdown, reboot, sysinit and single should be called by
init(8) and shutdown(8) and not manually.
sysvinit users will have to add sulogin to their inittab to secure the
console.
2008-10-27 18:01:03 +00:00
Roy Marples
c3e192a834
Stop ssd from waiting by default - most daemons are good now.
2008-09-26 23:58:57 +00:00
Roy Marples
a63303971a
Document the --verbose option.
2008-09-22 09:37:28 +00:00
Roy Marples
5610c8560c
s-s-d now handles interpreted daemons more easily.
2008-09-22 09:34:51 +00:00
Roy Marples
a72dc1194a
Style.
2008-09-19 11:34:35 +00:00
Roy Marples
dcc4aa131c
Document the limitation of symlinking services outside of the service directory, Gentoo #237263 .
2008-09-19 11:32:24 +00:00
Roy Marples
1ab1e9328a
Add -k,--umask option, Gentoo #232455 .
2008-08-20 10:02:11 +00:00
Roy Marples
cea206014d
Attempt to make s-s-d simpler by not enforcing the need for a full path and maybe working better with interpreted scripts.
2008-07-27 11:30:49 +00:00
Roy Marples
157db50df7
Fix is_older_than a little better, and make is_newer_than correct.
2008-07-03 13:30:17 +00:00
Roy Marples
587051ec67
Add the ewaitfile function so init scripts can wait until sockts are created, Gentoo #175783 .
2008-06-03 11:57:15 +00:00
Roy Marples
0e38dcc4d2
By default, rc-status now shows the statuses of the services in the current runlevel and any unassigned non stopped services, #52 .
2008-04-09 22:56:32 +00:00
Roy Marples
3ca8387966
Document SSD_NICELEVEL.
2008-03-29 09:37:59 +00:00
Roy Marples
11e33e81c8
Remove rc_service_start/stop from librc as they block and unmask signals. The application may not wish this behaviour and should fork/exec the service itself.
2008-03-28 08:42:05 +00:00
Roy Marples
be1f9b0a93
Add --exists and --resolve to rc-service.
2008-03-26 08:08:47 +00:00
Roy Marples
59b27ad7eb
Fix man install.
2008-03-25 17:37:54 +00:00
Roy Marples
85b480a6f2
Tweak man install.
2008-03-25 17:32:19 +00:00
Mike Frysinger
9ed5d28d15
add check/test rules
2008-03-24 06:10:40 +00:00
Roy Marples
494fb0a5f6
Add --list to rc-service to list all available services.
2008-03-21 09:10:59 +00:00
Roy Marples
6159a32f39
SVCNAME -> RC_SVCNAME, but export SVCNAME still for compat.
2008-03-19 19:57:24 +00:00
Roy Marples
d9ec62b22a
Add rc-service and update all softlevel refs to runlevel.
2008-03-19 17:11:50 +00:00
Roy Marples
51c825ceee
Make rc_getline private and save it's buffer so it's sort of like getline from glibc.
2008-03-17 21:27:37 +00:00
Roy Marples
4c14666423
Punt the rc_strcatpaths function and use snprintf instead to save on expensive malloc calls.
2008-03-17 13:25:56 +00:00
Roy Marples
50a7697bf2
rc_find_pids now returns RC_PIDLIST instead of a NULL terminated array.
2008-03-17 09:59:52 +00:00
Roy Marples
1fd1472dde
Add new stringlist files.
2008-03-16 17:01:35 +00:00
Roy Marples
cb9da6a262
Remove null terminated char ** lists in favour of RC_STRINGLIST, using TAILQ from queue(3). Refactor code style around the BSD KNF.
2008-03-16 17:00:56 +00:00
Roy Marples
df1377601b
We don't mount /lib/rc/init.d when / is rw at boot.
2008-03-08 15:18:53 +00:00
Roy Marples
6a2cce536e
Document the negation of keywords.
2008-03-04 10:40:31 +00:00
Roy Marples
15cf41e713
Split VPS into VSERVER and OPENVZ
2008-03-03 17:19:56 +00:00
Roy Marples
7a8e9d4ddb
Add a gitignore make target.
2008-03-03 13:04:08 +00:00
Roy Marples
61c476e72d
Use exlicit make targets, not directory contents.
2008-03-03 12:34:51 +00:00
Roy Marples
d1f7f0a304
Force the specification of a pidfile or process name if daemon is a script. Alternatively, document the use of starting the script interpreter and passing the daemon as an option.
2008-02-24 23:09:15 +00:00
Roy Marples
00aa221b98
Welcome to 2008.
2008-02-22 12:35:58 +00:00
Roy Marples
ad780077d2
Welcome to 2008.
2008-02-22 12:07:34 +00:00
Roy Marples
5bb09b6587
ewarn now goes to stderr to match portage behaviour.
2008-02-21 10:08:35 +00:00
Roy Marples
e1e36b2872
keywords -> keyword
2008-02-19 14:36:22 +00:00
Roy Marples
42bfd7b6dc
Move the shell code to check for RC_SYS to the keywords dependency.
2008-02-19 14:29:20 +00:00
Roy Marples
0364bb2c84
Add the nojail keyword which excludes services marked as such from the dependency tree when in a jail, #bug 22
2008-02-19 14:15:53 +00:00
Roy Marples
fbdc85f3b3
Restore the --env option.
2008-02-17 11:17:48 +00:00
Roy Marples
09ff8eeecd
rc-status -r now shows the current runlevel name.
2008-02-08 21:11:44 +00:00
Roy Marples
b49f779779
Document how to remove dependencies in configuration files.
2008-01-30 14:07:45 +00:00
Roy Marples
51a9c647b9
Allow !net to remove the net provision from dependencies.
2008-01-30 13:37:20 +00:00
Roy Marples
a597686ded
Document yesno, is_older_than and is_newer_than.
2008-01-18 14:17:58 +00:00