summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
Commit message (Collapse)AuthorAgeFilesLines
* `net.inet.ipf.fr_running' can be a negative value, which was introduced byjkim2005-07-071-1/+1
| | | | | | recent ipfilter import. Approved by: re (scottl), anholt (mentor)
* Remove REQUIRE and BEFORE lines since this script is not run by rcorderbrooks2005-06-301-2/+0
| | | | | | at startup. Instead it is called by other scripts. Approved by: re (network interface startup blanket)
* Add support for starting wpa_supplicant by adding the WPA keyword to anbrooks2005-06-302-1/+30
| | | | | | interface's ifconfig_<ifn> entry in /etc/rc.conf. Approved by: re (network interface startup blanket)
* When interfaces are given on the command line, don't attempt to filterbrooks2005-06-301-7/+4
| | | | | | | | them. Just try to run the given command on them. We need to be able to run stop functions on interfaces that have been deleted to stop wpa_supplicant. Approved by: re (interface startup blanket)
* Introduce new per-jail variable jail_<name>_flags, which allows to specifypjd2005-06-261-1/+4
| | | | | | | | | jail(8) flags (before the change we had hardcoded "-l -U root"). Submitted by: Frank Behrens <frank@pinky.sax.de> PR: conf/80244 Approved by: re (scottl) MFC after: 1 week
* Unbreak the ipfilter_loaded function. There doesn't seem to be a waydd2005-06-211-1/+1
| | | | | | | | | | for kldstat to ever print "IP Filter" (the module is called "ipfilter" and modules don't have anything like a description), so this function would always return false. That would cause prestart to attempt to load the module even if it's already loaded, which would fail and prevent the rules from being loaded. Approved by: re (dwhite)
* Honor the "dumpdev" kenv variable if it is set and the "dumpdev" rcdes2005-06-071-6/+17
| | | | | | variable is set to "AUTO". MFC after: 2 weeks
* Support code for the OpenBSD dhclient. This significantly changes thebrooks2005-06-072-81/+21
| | | | | | | | | | | | | | | | | | way interfaces are configured. Some key points: - At startup, all interfaces are configured through /etc/rc.d/netif. - ifconfig_<if> variables my now mix real ifconfig commands the with DHCP and WPA directives. For example, this allows media configuration prior to running dhclient. - /etc/rc.d/dhclient is not run at startup except by netif to start dhclient on specific interfaces. - /etc/pccard_ether calls "/etc/rc.d/netif start <if>" to do most of it's work. - /etc/pccard_ether no longer takes additional arguments to pass to ifconfig. Instead, ifconfig_<if> variables are now honored in favor of pccard_ifconfig when available. - /etc/pccard_ether will only run on interfaces specified in removable_interfaces, even if pccard_ifconfig is set.
* Remove RCng files that were brought in from NetBSD, but we ended up notobrien2005-06-0627-1188/+0
| | | | using them (or did and no longer do).
* We need to use 'applyset' command for devfs, 'apply hide' is not enough,pjd2005-05-231-6/+2
| | | | | | | because new devfs entries can show up later and one can access such entires from inside named chroot. In rc.d scripts we can use devfs_domount() function with devfsrules_hide_all policy and unhide 'null' and 'random' manually.
* Do not unconditionally mount devfs to ${jail_devdir}/dev. First checkcsjp2005-04-301-9/+12
| | | | | | | | | to see if a prior devfs has been mounted. If no devfs is mounted on ${jail_devdir}/dev then proceed. This will prevent the stack up of multiple devfs mounts on the same mount point. Discussed with: pjd MFC after: 1 week
* To allow /etc to be as minimal as possible in a diskless setup, we needbrooks2005-04-294-365/+2
| | | | | | | | | | | | | to run initdiskless before we run rcorder on /etc/rc.d. To allow this, move /etc/rc.d/initdiskless to /etc/rc.initdiskless and run it directly from /etc/rc. Remove /etc/rc.d/preseedrandom as it is no longer necessicary (we start with entropy unblocked) and was only used by initdiskless when it was needed. Discussed on: freebsd-rc Repocopy by: peter
* Add -h to the ln command to make the -f flag actually do something.dougb2005-04-241-1/+1
| | | | | | | | | | | | Without this flag, if the symlink existed already a new symlink would be created in the source directory. While harmless if the two symlinks were the same, it nonetheless caused pointless confusion. The pathological case is that when there is an existing /etc/namedb symlink, but named_chrootdir in rc.conf pointed to a different directory, it was the symlink in /var/named that was getting updated, not the one in /etc. This led to some difficult to diagnose problems for users.
* Add startup script and default configuration file for bsnmpd.glebius2005-04-172-1/+19
| | | | Reviewed by: harti
* Do not remove logging sockets. This fixes an issue where loggingcsjp2005-04-141-0/+2
| | | | | | | | | sockets placed into prisons from the host environment get clobbered by the prison's instance of cleanvar. (assuming /etc/rc is run in the prison). Discussed with: pjd, green, cperciva MFC after: 1 week
* The alternative suggested for /entropy as a shutdowndougb2005-04-111-5/+4
| | | | | | | | | | | | | | | save file was /var/db/entropy, which also happens to be the directory where the individual entropy files created by /usr/libexec/save-entropy are stored. Change the suggestion to be /var/db/entropy-file instead. In an error condition where the shutdown file is not created, the error message accessed a variable that doesn't exist. PR: conf/75722 Submitted by: Nicolas Rachinsky <list@rachinsky.de>
* 'dumpon' can run before 'initrandom' so make it.obrien2005-04-051-2/+2
| | | | This gives a better chance of debugging /dev/random related panics.
* When reloading rules via rc.d/pf, flush everything but existing stateseanc2005-04-041-1/+3
| | | | | | | | | entries that way when rules are read in, it doesn't break established connections. Approved by: mlaier Reviewed by: rc MFC after: 3 weeks
* Add a ugidfw_load() function and fix up some of the scripting in this file.trhodes2005-04-021-6/+20
| | | | | | This will allow better integration with the ports system. Submitted by: clement
* Remove the 'usbd' keyword (it isn't necessary for mixer). Also, usenjl2005-03-171-1/+1
| | | | | | | BEFORE instead of REQUIRE. Probably ok by: jhb MFC after: 3 days
* Start natd(8) before loading firewall rules, to give theru2005-03-161-2/+3
| | | | ipdivert.ko module a chance to load.
* Unhook the recently departed lomac file from the build.dougb2005-03-131-1/+1
| | | | Forgotten by: trhodes (the real one)
* Remove mac_lomac(4) functionality. The proper way is to use loader.conftrhodes2005-03-121-19/+0
| | | | | | or build the policy into a kernel. Approved by: rwatson
* It is sufficent to require rcconf rather than initdiskless.brooks2005-03-022-2/+2
|
* Remove stray else.brooks2005-03-021-1/+0
| | | | | Reported by: Tai-hwa Liang <avatar at mmlab dot cse dot yzu dot edu dot tw> Point hat: brooks
* Allow chkprintcap(8) to be run before lpd is started. Disabled bybrooks2005-03-022-2/+8
| | | | | | | | | | | | default for now. Default flags create missing directories. Remove comment about doing this in etc/rc.d/var. Unlike in the PR, I chose to do this in the lpd script where we reliably have /usr available. PR: conf/71488 Submitted by: RZ-FreeBSD0904 at fh-karlsruhe dot de
* If we don't have /usr/sbin/mtree, try to mount /usr. We're only likelybrooks2005-03-021-3/+12
| | | | | | | to hit this case when /usr is remote and thus hasn't been mounted (since you're supposed to have /var before mounting remote file systems). Normal machines that don't have a /var for some reason will have /usr already available because it's local.
* - Update etc/rc.d/newsyslog to FreeBSD standards and install it.brooks2005-03-023-10/+9
| | | | | | | | | | | | | | | | | - Enable it by default, running newsyslog with -CN which creates files that have the C flag specified in /etc/newsyslog.conf. - Remove the "newsyslog -CC" call from etc/rc.d/var and the check for newsyslog. - Add the C flag to entries in /etc/newsyslog.conf that are currently installed as part of the base system. There are two effects from this change: - Users who delete default syslog files to stop logging to them will need to set newsyslog_enable=NO in rc.conf or remove the C flag from those file in /etc/newsyslog.conf or they will come back on the next boot. - Diskless systems now create the same set of files that ordinary systems have by default instead of every file in newsyslog.conf.
* - Remove the dependency of /usr/bin/touch by using "cp /dev/null <target>"brooks2005-03-011-4/+12
| | | | | | | to create /var/log/lastlog. - Also create /var/log/wtmp if missing. - Attempt to create these files unless populate_var is NO rather then only when /var is empty or populate_var=YES.
* command_args is redundant.njl2005-02-271-2/+0
| | | | Submitted by: Pawel Worach
* Add rc.conf options for powerd (disabled by default) and hook the scriptnjl2005-02-261-1/+1
| | | | up to the build.
* Add an rc script for powerd(8).njl2005-02-261-0/+20
|
* Add the ability to specify "NONE" if the user wants no change for thenjl2005-02-261-0/+3
| | | | | | given power profile. MFC after: 1 day
* Quiet error messages if the requested sysctls are not present.njl2005-02-251-6/+6
| | | | MFC after: 1 day
* Add support for cpufreq to power_profile(8). Values for on/offline cpunjl2005-02-061-4/+6
| | | | | | frequencies are specified with performance_cpu_freq and economy_cpu_freq. Of course, special values LOW and HIGH are also supported. Also, remove old throttling support.
* Add a comment which explain why we need to use special function instead ofpjd2005-01-301-0/+2
| | | | tr(1)/sed(1)/awk(1).
* We cannot use sed(1), because rc.d/gbde has to be called beforepjd2005-01-231-1/+20
| | | | | | | | | rc.d/mountcritlocal and sed(1) is placed in /usr/bin/. Other useful tools for this task are also placed in /usr/ (tr(1), awk(1)), so I implemented local_tr() function which works simlar to tr(1). Reported by: Amir Shalem <amir@boom.org.il> MFC after: 1 week
* Fix handling of providers with / in them (e.g. mirror/foo).pjd2005-01-211-1/+2
| | | | | Submitted by: Attila Nagy <bra@fsn.hu> MFC after: 1 week
* s/ntpdate_command/ntpdate_program/ to match rc.conf(5) andceri2005-01-171-1/+1
| | | | | | | | | /etc/defaults/rc.conf. PR: conf/76188 Submitted by: Arne Wörner <arne_woerner at yahoo dot com> Approved by: murray MFC After: 7 days
* Remove debugging that made it into the commit.obrien2005-01-161-2/+0
|
* "REQUIRE: cleanvar" for all RC's writing into /var/run.obrien2005-01-1618-18/+20
|
* Create three additional X socket directories. Using X applications when anotheranholt2005-01-121-5/+6
| | | | | | | user owns these directories or the sticky bit is unset may open security holes, so simply create them at startup with the correct owner/mode. MFC after: 1 day
* Use "KEYWORD: shutdown" so shutdown commands will actually be executed.peadar2004-12-201-0/+1
| | | | Approved by: dougb@
* When stopping a chrooted named, unmount the devfs filesystem frompeadar2004-12-201-0/+8
| | | | | | | the chroot area. This stops "umount -a" failing when dropping to single user. Reviewed by: dougb@
* If /etc/named is a symlink, try to make sure it points the right place.phk2004-12-181-0/+4
|
* Use rc.subrbrian2004-12-152-20/+20
| | | | | PR: 72505 Submitted by: Amir Shalem <amir@active.ath.cx>
* Improve the RC framework for the clean booting/shutdown of Jails:rse2004-12-141-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Feature: for flexibility reasons and as a prerequisite to clean shutdowns, allow the configuration of a stop/shutdown command via rc.conf variable "jail_<name>_exec_stop" in addition to the start/boot command (rc.conf variable "jail_<name>_exec_start"). For backward compatibility reasons, rc.conf variable "jail_<name>_exec" is still supported, too. 2. Debug: Add the used boot/shutdown commands to the debug output of the /etc/rc.d/jail script, too. 3. Security: Run the Jail start/boot command in a cleaned environment to not leak information from the host to the Jail during startup. 4. Feature: Run the Jail stop/shutdown command "jail_<name>_exec_stop" on "/etc/rc.d/jail stop <name>" to allow a graceful shutdown of the Jail before its processes are just killed. 5. Bugfix: When killing the remaining Jail processes give the processes time to actually perform their termination sequence. Without this the subsequent umount(8) operations usually fail because the resources are still in use. Additionally, if after trying to TERM-inate the processes there are still processes hanging around, finally just KILL them. 6. Bugfix: In rc.shutdown, if running inside a Jail, skip the /etc/rc.d/* scripts which are flagged with the KEYWORD "nojail" to allow the correct operation of rc.shutdown under jail_<name>_exec_stop="/bin/sh /etc/rc.shutdown". This is analogous to what /etc/rc does inside a Jail. Now the following typical host-configuration for two Jails works as expected and correctly boots and shutdowns the Jails: ----------------------------------------------------------- # /etc/rc.conf: jail_enable="YES" jail_list="foo bar" jail_foo_rootdir="/j/foo" jail_foo_hostname="foo.example.com" jail_foo_ip="192.168.0.1" jail_foo_devfs_enable="YES" jail_foo_mount_enable="YES" jail_foo_exec_start="/bin/sh /etc/rc" jail_foo_exec_stop="/bin/sh /etc/rc.shutdown" jail_bar_rootdir="/j/bar" jail_bar_hostname="bar.example.com" jail_bar_ip="192.168.0.2" jail_bar_devfs_enable="YES" jail_bar_mount_enable="YES" jail_bar_exec_start="/path/to/kjailer -v" jail_bar_exec_stop="/bin/sh -c 'killall kjailer && sleep 60'" ----------------------------------------------------------- # /etc/fstab.foo /v/foo /j/foo/v/foo nullfs rw 0 0 ----------------------------------------------------------- # /etc/fstab.bar /v/bar /j/bar/v/bar nullfs rw 0 0 ----------------------------------------------------------- Reviewed by: freebsd-hackers MFC after: 2 weeks
* Use utils from /rescue vs. /stand. Also use pax rather than cpio & gzip.obrien2004-12-121-1/+1
|
* Fix a typo in an error message.mux2004-11-241-1/+1
| | | | Spotted by: ceri
* Implement per-jail fstab(5) files. Here's a rc.conf sample usingmux2004-11-231-0/+19
| | | | | | | | | | | | | this feature for a jail named foo : jail_foo_mount_enable="YES" jail_foo_fstab="/etc/fstab.foo" The second line is actually useless, since the code defaults to using "/etc/fstab.$jailname" as the fstab file if none is specified. MFC after: 3 days Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
OpenPOWER on IntegriCloud