summaryrefslogtreecommitdiff
path: root/etc/rc
AgeCommit message (Collapse)Author
2016-07-10Fix detection of /usr/lib on NFS.Robert Peichaer
Found by Frank Scheiner, thanks for reporting this. OK krw, halex 'cool' deraadt
2016-05-29Improve error handling in reorder_libs()Robert Peichaer
- run commands in subshell only if mktemp is successful - on error just leave the for-loop but set _error=true - cleanup tmpdirs afterwards - set _error=true if the ro remount fails - print appropriate final message depending on $_error positive feedback from deraadt OK krw
2016-05-27No need to show the messages if we skip in case of /usr/lib on nfs.Robert Peichaer
OK deraadt
2016-05-27Add function comments.Robert Peichaer
OK sthen, deraadt
2016-05-26whitespace found during reviewTheo de Raadt
2016-05-26- rename rebuildlibs() to reorder_libs()Robert Peichaer
- move the info message inside the function - skip reordering if /usr/lib is on a nfs mounted filesystem - temporarily remount rw if /usr/lib is on a ro ffs file-system OK deraadt
2016-05-22Use the -F flag of install(1) to ensure the file's content is flushed to disk.Robert Peichaer
OK deraadt
2016-05-14unhphenate the world: re-order -> reorderJason McIntyre
sthen does not object
2016-05-05show what we're doing when reordering libraries, otherwise the textStuart Henderson
above it is "starting network", which can make you think something is broken when your machine is as slow as some of mine. "Yeah, that's a pretty crappy machine" deraadt@
2016-04-27We want to run sysmerge(8) a bit earlier in the boot process so that it has aAntoine Jacoutot
chance to update the *default* configuration of the important daemons. Factorize rc.firsttime into a run_upgrade_script() function which takes the script suffix name as an argument. i.e. run_upgrade_script sysmerge / run_upgrade_script firsttime discussed with deraadt@ ok deraadt@ rpe@
2016-04-27Use 'sort -V' which is actually meant to sort version numbers.Robert Peichaer
Noted by zhuk@ OK deraadt@
2016-04-26Re-link (only the newest) libc.so, placing the objects in a randomTheo de Raadt
order. with shell script assistance from rpe
2015-12-29Replace single pattern case-blocks with simpler code.Robert Peichaer
OK halex@
2015-12-06Add missing rc bits for rebound.Robert Peichaer
rc-wise OK aja@ jasper@
2015-12-05add rcscript for vmdJasper Lievisse Adriaanse
ok mlarkin@ prompted by deraadt@
2015-12-02Since version 1.467 of /etc/rc, it was no longer possible to addRobert Peichaer
shlib_dirs using /etc/rc.conf.local. Fix from Jan Johansson, thanks. OK krw@, halex@
2015-11-27yppasswd went awayTheo de Raadt
2015-11-10Fix typos in commentsTim van der Molen
2015-11-01A missed backticks to $() conversion.Robert Peichaer
OK krw@
2015-10-18Finish first round of rework of the rc script.Robert Peichaer
OK krw@ halex@
2015-10-18Forcibly delete /var/run/ypbind.lock to prepare for the worst cases.Theo de Raadt
ok aja
2015-10-03Enable eigrpd(8) and eigrpctl(8) in the buildsRenato Westphal
ok deraadt@
2015-09-29Besides the usual style changes:Robert Peichaer
- verify that kbd is executable and kbdtype is not empty - use safer 'print --' to pipe the initial pf ruleset to pfctl - simplify the ipsecctl if-block Feedback and OK halex@ OK krw@
2015-09-13- FOO=bar; export FOO -> export FOO=barRobert Peichaer
- run domainname only with a non-empty /etc/defaultdomain file - Make single-user if-block more intuitive, which also matches better what the comment actually says OK halex@, krw@ on a similar diff
2015-09-13Remove setup_X_sockets():Robert Peichaer
The creation of Unix sockets directories in /tmp for X happens right after pruning /tmp. So the whole dance of checking for their existence, ownership or permissions is not necessary. It's safe to just create them with the right permissions if X is installed. Changes to do_fsck(): Remove the _flags variable and pass flags to fsck directly with "$@". Feedback and OK halex@ OK krw@ on a similar diff
2015-09-12Provide an ftpproxy6 rc script. ftp-proxy can only open one listening socketStuart Henderson
at a time, so a second instance of the daemon is required. OK mikeb stsp ajacoutot
2015-08-28Changes for start_daemon():Robert Peichaer
- use more descriptive variable name Changes for make_keys(): - use variables for file paths - key -> keys in message - take into account the return codes of isakmpd private *and* public key generation OK krw@ halex@
2015-08-22- add usage infoRobert Peichaer
- initialize _ban variable - style OK halex@
2015-08-22Restore previous behaviour for wsconsctl_conf().Robert Peichaer
In wsconsctl.conf configuration variables can contain doublequotes which are removed by the shell if wsconsctl is used interactively. In scripts, without using eval, these doublequotes are preserved and the wsconsctl command complains about "illegal character in input". Found by and OK jmc@ With feedback from and OK krw@, halex@
2015-08-13Changes to sysctl_conf(), mixerctl_conf() and wsconsctl_conf():Robert Peichaer
- no need to check for non-empty *.conf files, stripcom handles that now - pipe stripcom output directly to while-read-loop - quote the argument to the *ctl commands - no need to double shutup mixerctl, -q already means quiet OK krw@, halex@
2015-08-12Start the rework of the /etc/rc shell script.Robert Peichaer
General changes: - apply a similar 'style' as used in the installer scripts - improve comments to be more to the point, remove where code is obvious - document usage of functions if they have arguments - rename variables where it improves readability - replace really old-school shell code with more contemporary idioms Changes to stripcom(): - skip empty files (eleminates tests for this before calling stripcom) - remove {} around the while-loop, feed file directly - instead of continue if empty and then print, print only if non-empty - use the safer "print -r --" instead of plain "echo" - quote "$_line" on output to prevent globbing Changes to update_limit(): - use {,-cur,-max} instead of "" -cur -max - eleminate if-block with reverse test and continue OK halex@ krw@
2015-08-03Place etc/defaults/radiusd.conf and etc/rc.d/radiusd. Modify etc/rcYASUOKA Masahiko
to hook the rc script and modify etc/rc.conf to make it disable by default. Also add an entry for /etc/radiusd.conf to etc/changelist and etc/mtree/special. ok deraadt
2015-07-20Disable Strict Bourne shell mode for /etc/rc and /etc/netstart to beRobert Peichaer
able to use ksh syntax within these scripts. This way init doesn't need to be changed, which starts /etc/rc using /bin/sh and people can still use "sh /etc/netstart ifname". Idea from and OK halex@ OK deraadt@ krw@ guenther@
2015-07-19Replace test command with [].Robert Peichaer
OK halex@ krw@
2015-07-18Put the opening curley brackets on the same line as the function name.Robert Peichaer
OK krw@ halex@
2015-07-18- remove trailing blanks introduced in previous commitRobert Peichaer
- no space in redirections like </foo or >$bar - few other minor whitespaces OK krw@
2015-07-18Improve commentsRobert Peichaer
- Add comments for functions - Start comments with capital letters - End comments with a full stop - Allow comments to extend up to column 80 OK krw@
2015-05-02Drop pf_rules and ipsec_rules from rc.conf(5); it shouldn't have been madeAntoine Jacoutot
tweakable: there's no real point and these files support the 'include' option so one can always get its config from whatever path... especially useful when testing a new ruleset. man page inputs from schwarze@ ok halex@ schwarze@ rpe@ deraadt@
2015-03-11'rc.firstime' -> 'rc.firsttime' in comment.Kenneth R Westerback
Diff from Navan Carson via tech@
2015-01-22Use /etc/services names in all the default pf rules (most alreadyKenneth R Westerback
did). This allows any local changes to /etc/services to be effective if all you have is the default. Issue pointed out by Brian S. Vangsgaard on bugs@. Thanks! ok phessler@ deraadt@
2014-12-03Unhook rtsol(8) and rtsold(8) from the build.Florian Obser
OK deraadt@
2014-11-30Fix comment: We don't use RC4 anymore, it's better to be moreDavid Coppa
generic. ok miod@
2014-11-17Make /var/tmp a symbolic link to /tmp. The creation of /var/tmp in theTheo de Raadt
often space-constrained /var filesystem was a historical mistake. There are big implications for the daemons which assume they won't run out of space, and this is a first step towards trying to improve the situation. Move /tmp to the same 7-day expiration rules that /var/tmp had. vi.recover works just as well as before, except on memory filesystems; indicating that vi should be repaired to write files into homedirs or something. done with rpe ok many
2014-11-05When clearing /tmp, use "-maxdepth -1" instead of "-type d -prune".Todd C. Miller
This is easier to understand and fixes a bug where the "-type d -prune" was misplaced as noticed by pirofti@. OK deraadt@
2014-09-15Remove sendmail tentacles. ok krw@ ajacoutot@Matthieu Herrb
2014-08-26usr.sbinRobert Nagy
2014-08-22disable use of bind in base; in the base use nsd/unbound instead.Theo de Raadt
a proper & complete bind port will show up. discussed with many for years
2014-08-17Execute /etc/netstart using sh(1) instead of sourcing it.Antoine Jacoutot
Committing early to make sure we have time to fix any side-effect. ok deraadt@
2014-08-04enable httpd; ok deraadt@Christian Weisgerber
2014-07-19Print a warning message if the files with the random seed are notAlexander Bluhm
writeable during shutdown. This prevents ugly error messages when the machine is rebooted from singe-user without mounting the file systems read-write. suggested by deraadt@