ajacoutot
ec3e2016f6
Make reload and check consistent with start/stop.
ok robert@
14 years ago
ajacoutot
816fefe813
Move the redirections into the rc_cmd itself instead of rc_start and
rc_stop so scripts don't need to set it.
ok sthen@ (on a much bigger diff) robert@
14 years ago
ajacoutot
4d16621cc3
Move rc_pre and rc_post out of the rc_start/rc_stop functions into the
rc_cmd start/stop actions. This way when rc.d(8) scripts override these
functions, we don't loose rc_{pre,post}.
Add a max 5 secs loop after rc_stop in the rc_cmd top action. This seems
to be a good default for returning to command line only after the daemon
has really stopped. This fixes "restart" for some daemons and allows to
properly stop some others at shutdown time.
Note that this is just a best-effort default, some daemons may need a
lot more time to shutdown but this case is usually handled in the
rc.d(8) script itself and we obviously do not want to hang the shutdown
process.
Call rc_cmd start/stop in restart and _not_ rc_start/rc_stop which can
get overriden in a script.
discussed with and inputs from sthen@ and schwarze@
ok sthen@ robert@
14 years ago
ajacoutot
31b7e1a52c
Add an "rc_bg" variable that is undefined by default and allows to start
a daemon in the background.
man page tweaks from schwarze@
discussed with an ok schwarze@ robert@
14 years ago
deraadt
563890ecd9
wrong type for variable; spotted by christian.siebert@cs.tu-chemnitz.de
ok guenther
14 years ago
guenther
48c37b4271
Fix PR 6267: recheck POSIXLY_CORRECT each time getopt_long() starts a new
argv and don't suppress the handling of leading '-' in optstring when
POSIXLY_CORRECT is set.
Based on patch from Eric Blake.
ok and manpage update from millert@, manpage ok jmc@
14 years ago
claudio
2528dce4db
Correct msgbuf_write() example. OK jmc@ and nicm@
14 years ago
matthew
a86644214c
Fix __cxa_finalize() so that calling __cxa_finalize(NULL) properly
invokes handlers registered with __cxa_atexit().
"seems right" deraadt@
14 years ago
ajacoutot
0895d6d8a2
Remove daemon_shell and force the use of /bin/sh for the su(1) call.
ok robert@ espie@ miod@
14 years ago
mikeb
793f5f6579
allow users to enable access to the /dev/crypto, but keep it turned off
by default, adjust comments in sysctl.conf; ok markus, tedu, djm, miod
14 years ago
ajacoutot
b303212ce6
Add the rc_scripts variable for rc.d(8).
prodded by espie@
ok miod@
14 years ago
sobrado
f7849bd797
fix an unbalanced parenthesis in a comment; while here, split the comment
in a better place to make it more readable.
ok jmc@ and miod@
14 years ago
jakob
90e9203fc3
change default nsd(8) paths. ok sthen@
14 years ago
schwarze
07ff512110
Correctly escape a literal colon in an enclosure;
the \: roff escape is an optional line break.
14 years ago
david
dd75794eda
add ldapd.conf; ok sthen@
14 years ago
david
72a6fda837
catch up changelist with recent additions; ok sthen@
14 years ago
claudio
7ac30f3c8a
Add 2001:2::/48 (prefix used for benchmarking) to the list of
non-routeable prefixes. While there sort list.
Diff provided by Andre Keller.
14 years ago
david
4aaa4831a6
remove EOL whitespace
14 years ago
david
327941d99f
sort entries
14 years ago
david
e37a14dd0b
update location of host.random: it moved from /etc to /var/db in 1999...
14 years ago
deraadt
52acc35760
We should not sum the install*.iso file, since it is not created at build
time. We've been summing the one from the previous build (then additional
goo I run has been cleaning it up..)
14 years ago
jmc
aae2647dbc
superceded -> superseded;
14 years ago
deraadt
7c87ca9df5
in the most trivial way, request that the kernel arc4random re-key after
we run netstart
ok tedu, djm liked it too
14 years ago
deraadt
36e512981e
move to 4.9-current
14 years ago
deraadt
9f87be4749
talk to /dev/arandom as a single read or write.
in particular a single write will result in a single re-key event,
rather than 64 writes causing 64 re-keys -- wasting the kernel's time.
ok guenther
14 years ago
ajacoutot
00107b2b9e
Put the "su -c ..." command into an rcexec variable so that we can
easily use it in rc scripts instead of copying/pasting the same huge
command lines everywhere.
ok robert@ sthen@
14 years ago
ajacoutot
219ce41690
Check for a login class that match the rc script name and if we find one
let's use it. If not, then fall back to using daemon.
While here, do some reordering.
"I like this" sthen@, ok robert@
14 years ago
krw
d15a9b6dbc
Update to better describe reality, i.e. disklabel(8) UID usage.
ok jmc@ jsing@
14 years ago
guenther
2a778b4ce6
Standards compliance: expose dirfd with XPG7 and scandir and alphasort
with POSIX 2008
ok millert@
14 years ago
deraadt
7c582a1c5e
Start shipping bsd.mp for hppa; ok miod
14 years ago
ajacoutot
be1812f231
After the recent changes, there is no need for an rc_conf function.
As schwarze@ also stated, this will prevent anyone from calling it
(which would be an error) and makes it clearer that rc.subr is not just
a functions container.
No functionnal change, unless you were calling rc_conf from an rc script
which would have been wrong anyway.
ok schwarze@ robert@
14 years ago
jasper
76f70ab125
- add /usr/lib/pkgconfig/
14 years ago
ajacoutot
ff4f8c6619
There is no point in calling rc_conf manually from each and every rc
script; instead, rc.subr can call rc_conf itself right after reading in
rc.conf.
from schwarze@ (committing on his behalf)
ok robert@
14 years ago
ajacoutot
2f1b097008
Fix a flaw in the rc.subr framework reported by stephan@ where
local_rcconf would get overwritten by flags from the rc script itself.
Based on an original idea and diff from robert@, create an rc_conf
function that we add in the rc_script after the defaults daemon*
variables.
This way we can use defaults variables names in other part of the script
(when defining a specific pexp for instance).
While here, simplify setting up the default daemon variables so that we
don't need to do any substitution in rc_start.
rc scripts must include daemon variables before calling rc_conf. All
other locally modified variables (pexp, rc_reload, local additions...)
must come after.
feedback from and works for sthen@
ok robert@
14 years ago
deraadt
72958252d8
Consistantly use /dev/arandom for feeding entropy to the kernel.
ok kjell otto miod
14 years ago
millert
58a7be37c3
Do not attempt to prepend /dev/ to path if it already contains a slash.
OK jsing@
14 years ago
otto
c709ba9eaa
remove comment that hasn't been true for quite a while now;
ok deraadt@ djm@
14 years ago
millert
aab35837b7
Always return a pointer to the static buffer in realpath, even if
path and realpath are the same. This matches the manual and avoids
a bogus cast to non-const. OK jsing@, previous version OK kettenis@
14 years ago
millert
642ed026af
opendev() path argument should be const. OK deraadt@
14 years ago
tedu
a4a61f54ff
allow default blowfish rounds to be tweakable by arch, no behavioral change
ok deraadt
14 years ago
dhill
bc96223819
avoid pointer arithmetic on void *
tested for a while by me.
ok otto@
14 years ago
ajacoutot
7dddee5347
Add IANA officially assigned numbers for zabbix.
ok sthen@ deraadt@
14 years ago
martynas
bb956f3634
- make HUGE_VAL, HUGE_VALF, HUGE_VALL, INFINITY, NAN expand to the
constant expressions with the help of gcc post-3.3.
ok millert@, mikeb@. been in snaps for weeks.
14 years ago
ajacoutot
9cf9abb40e
Prefer '-l' over '-' which is deprecated.
Also noticed and agreed by eric@
ok robert@
14 years ago
robert
90f75c52e5
simulate a full login with su, now that the environment is fine after
the last su(1) commit
14 years ago
millert
70cb24d85a
Only run tset for interactive shells. OK robert@
14 years ago
ajacoutot
c4b90b3612
Make it possible to mark an rc action as unsupported by setting the
corresponding variable to NO.
e.g.
rc_reload=NO
This will save us the trouble of copying the same rc_reload() function
(or others) all over the tree.
ok robert@
14 years ago
ajacoutot
0ac91ffd59
Sanitise daemon_flags: remove multiple whitespaces from _rcflags.
requested by okan@, ok robert@
14 years ago
robert
97fd28dab8
Do not overwrite the settings in the rc scripts itself, so use the same
method to handle _class, _user and _shell as we do for _flags.
discussed with and ok ajacoutot@
14 years ago
robert
b8cf932a14
Add support for setting _user _class and _shell for a specific daemon,
and use su to start the daemons.
By default if there is no class defined, daemon will be used. For a shell
it defaults to /bin/sh.
14 years ago