summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Convince mergemaster to maintain/merge ramdisk scripts too.wes2004-11-161-1/+1
| | | | | Submitted by: Ben Kelly <ben.kelly@ieee.org> PR: bin/64079
* Shutup debugging output.wes2004-11-161-1/+0
|
* Unify the ci/co variables now that the the tty drivers now use the sameobrien2004-11-141-40/+35
| | | | character for both.
* Catch up with PHK's sio(4) rework [sys/dev/sio/sio.c rev. 1.456].obrien2004-11-141-23/+23
|
* Add two new rc.conf options: tmpmfs_flags and varmfs_flags.keramida2004-11-092-4/+4
| | | | | | | | | | | | | | These can be used to pass extra options to the mdmfs(8) utility, to customize the finer details of the md file system creation (i.e. to turn on/off softupdates, to specify a default owner for md filesystem, etc). Use these two new flags to mount tmpmfs and varmfs without softupdates, since it doesn't make much sense to use SU on malloc-backed file systems. Reviewed by: mtm Inspired by: J. D. Bronson, jbronson at wixb dot com
* Stop method for swap1 script was introduced, because gmirror needed it.pjd2004-11-051-1/+1
| | | | | Now gmirror use shutdown hooks to mark mirrors as clean on shutdown, so this is not needed anymore.
* - Make the header conform to standard rc.d style.mtm2004-11-051-2/+2
| | | | | - The 'before ipfw' directive seems bogus, and should instead be 'before rcconf'.
* remove vinum startup script.phk2004-11-042-18/+1
|
* Sort files properly.pjd2004-11-021-2/+2
|
* Do a better job of supporting more than one mouse devicemtm2004-11-011-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on the system. To start/stop/check on a specific device give the device name as the second argument to the script: # /etc/rc.d/moused start ums0 To use different rc.conf(5) knobs with different mice use the device name as part of the knob. For example, if the mouse device is ums0, then: moused_ums0_enable=yes moused_ums0_flags="-z 4" moused_ums0_port="/dev/ums0" Starting rc.d/moused without the device argument will use the standard moused_* flags. So, this commit should not disrupt or change current usage. To preserve current behaviour with respect to usb mice, which appear automatically when inserted, there is a new knob, moused_nondefault_enable, which will treat any devices without rc.conf knobs as enabled. To minimize knobs in /etc/rc.conf, the device file and pid file are auto-computed, so that in the typical case for a usb mouse you don't need to add anything extra in /etc/rc.conf to get it working. Additionally, this updates /etc/usbd.conf to use the rc.d/moused script so people don't have to modify it to configure their usb mouse anymore. MFC after: 1 month
* Allow to change interfaces name on boot time.pjd2004-10-301-0/+3
| | | | | | | | | Now, one should be able to put something like this into /etc/rc.conf: ifconfig_fxp0_name="net0" ifconfig_net0="inet 10.0.0.1/16" Reviewed by: green
* - Add 'check' command for checking rules syntax.pjd2004-10-251-11/+14
| | | | | | - Before flushing rules in 'reload' command, check first if rules are correct. - Do not duplicate checking if $pf_rules file exists.
* - use `realpath /dev/dumpdev` instead of just /dev/dumpdev so messagesdes2004-10-241-3/+8
| | | | | will show the real device name - show different error messages for missing dump device and directory
* Move devfs earlier in the boot sequence. Some system daemons and othermtm2004-10-231-2/+2
| | | | | | programs may need to use the symlinks and permissions that it sets up. Discussed on: -current
* Automatically load the ipdivert module if it was not compiled into the kernelandre2004-10-221-0/+13
| | | | and natd_enable is true.
* When dumpdev is set to 'auto', and a suitable swap device is found,thomas2004-10-182-3/+11
| | | | | create a symbolic link /dev/dumpdev designating that device so savecore can find and save a previous kernel dump.
* Remove unused computation of memory size.thomas2004-10-181-1/+0
| | | | Reviewed by: des
* Remove requirement on FreeBSD keyword.trhodes2004-10-141-1/+1
| | | | Skipped by: mtm (/me glares at mtm) :)
* Remove the requirement for the FreeBSD keyword as it no longermtm2004-10-07129-129/+89
| | | | | | | makes any sense. Discussed with: dougb, brooks MFC after: 3 days
* - Be more userfriendly and allow to specify gbde device name in those forms:pjd2004-10-071-10/+13
| | | | | | | | | | | device device.bde /dev/device /dev/device.bde - Fix stop routine: + There don't have to be file system mounted on gbde device, so ignore errors from umount(8). + Only detach existing gbde devices.
* Only try to attach if parent device actually exists.pjd2004-10-071-1/+1
| | | | | | | I used ugly "/dev/${parent}" instead of "${parentdev}", because "/dev/" prefix for devices listed in gbde_devices variable is optional. Reported by: Sean McNeil <sean@mcneil.com>
* Lock file for gbde devices is optional.pjd2004-10-061-2/+6
|
* Hide all the devices in the chroot dev except for random and null.dougb2004-09-301-0/+3
|
* Give users the ability to load a mac_bsdextended(4) ruleset on boot (defaultstrhodes2004-09-292-1/+53
| | | | | | | to NO of course). Provide a basic ruleset file, rc.bsdextended, but allow the filename to be overridden through rc.conf. Discussed with: rwatson (awhile ago)
* Create a named chroot directory structure in /var/named, and use itdougb2004-09-281-10/+30
| | | | | | | | | | | | | | | | by default when named is enabled. Also, improve our default directory layout by creating /var/named/etc/namedb/{master|slave} directories, and use the former for the generated localhost* files. Rather than using pax to copy device entries, mount devfs in the chroot directory. There may be some corner cases where things need to be adjusted, but overall this structure has been well tested on a production network, and should serve the needs of the vast majority of users. UPDATING has instructions on how to do the conversion for those with existing configurations.
* It's not necessary to create an rndc.key file if the user alreadydougb2004-09-261-1/+2
| | | | | | has an rndc.conf file. Submitted by: Sergey Mokryshev <mokr@mokr.net>
* Fix two glitches that appear in the non-chroot case. First, if notdougb2004-09-241-1/+3
| | | | | | | | chrooted the pid symlink code should not fire. Also, remove the quotes around the chroot variable in the rndc-confgen invocation so that if not chrooted the command will still succeed. Pointed out by: Sean McNeil <sean@mcneil.com>
* Fix a comment typo: s/neccessary/necessary/keramida2004-09-241-1/+1
|
* Update to reflect BIND 9 in the base:dougb2004-09-241-16/+17
| | | | | | | | | | | | | | | 1. Making the pid symlink now has to happen after named starts, otherwise it can generate a fatal error. 2. named-xfer is not part of the BIND 9 world. 3. BIND 9 needs a /dev/random in the chroot directory if chrooted. 4. Only the pid file is symlinked now, the ndc socket is BIND 8 only. 5. Create an rndc.key file for the user if one does not exist. This (generally) allows a BIND 8 config file to be used in a BIND 9 world with little or no modification.
* If $dumpdev is set to AUTO, use the first suitable swap partition listeddes2004-09-201-0/+10
| | | | | | in /etc/fstab, or print an error message if no suitable device was found. MFC after: 4 weeks
* Teach swap1 script how to remove added swap devices on system shutdown.pjd2004-09-171-21/+1
| | | | | | Without this change, if one had a swap-on-mirror configuration, gmirror will rebuild mirror component(s) on boot, because they are dirty (they were open on shutdown).
* We don't have any providers of `beforenetlkm' in FreeBSD. Remove thekeramida2004-09-163-3/+3
| | | | | | dependency to it from our rc.d scripts. Approved by: mtm
* Fix requirement of `network' to `NETWORK' because the former isn'tkeramida2004-09-161-1/+1
| | | | | | provided by any rc.d script. Approved by: mtm
* Bring back etc/rc.d/ntpdate as requested by scads of people. This isn't aseanc2004-09-153-2/+36
| | | | | | | | | | | | | | complete backout as the ntpd_sync_on_start etc/rc.conf tunable is still present, though the default is now NO (was YES). Since we're no longer syncing time at startup by default when ntpd is enabled (as was the case 24hrs ago), remove UPDATING entry pointing out that ntpd(1) -g is slower than ntpdate(1). Hopefully ntpd_sync_on_start="YES" can be made the default for -CURRENT after 5.3 is cut. At the very least, this should be set to YES when a user requests to have ntpd enabled via sysinstall(1). Requested by: many
OpenPOWER on IntegriCloud