summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
Commit message (Collapse)AuthorAgeFilesLines
* Add a new rc.conf variable, sendmail_rebuild_aliases, which tellsgshapiro2007-06-121-8/+10
| | | | | | | | | | | | | | | /etc/rc.d/sendmail whether or not to run newaliases if the database is missing or the aliases text file is newer than aliases.db. In my opinion, the aliases file should never be automatically rebuilt. The current text form could represent a work in progress. Therefore, in FreeBSD 7.0, this new option will default to "NO". When this rc.d change is MFC'ed, it will need to remain "YES" to maintain backward compatibility. PR: conf/86252 Approved by: re (kensmith) MFC after: 3 days
* Finish making resolv ordering deterministic by REQUIRE'ing it here.dougb2007-06-021-1/+1
|
* Add REQUIRE netif to make ordering more deterministic, and to make suredougb2007-06-021-5/+6
| | | | | | we have a fighting chance of having useful stuff from DHCP. Tighten up the code a little, and fix whitespace issues.
* Fix indentation.rse2007-05-241-1/+1
|
* Remove two superfluous trailing semicolons.rse2007-05-242-2/+2
|
* Remove two unnecessary and useless sub-shell constructs.rse2007-05-242-2/+2
|
* backout filter of Nil UUID as the boot loader code already filters out Nil ↵rse2007-05-221-4/+0
| | | | UUIDs (see src/sys/boot/i386/libi386/smbios.c:smbios_setuuid for details)
* Remove the ugly csh(1) based UUID lower-case translation hack fromrse2007-05-221-1/+0
| | | | | | /etc/rc.d/hostid now that we switched the origin of the UUID (variable smbios.system.uuid as provided by the i386 BIOS code) to already provide a standard conforming lower-case UUID text representation.
* Cleanup style by consistently using braces around variable expansion andrse2007-05-211-1/+5
| | | | | apply an addition from Andrew Thompson <thompsa> for filtering out the special "Nil" UUID (all zeros) which would be a useless host UUID.
* Adjust UUID lower-case translation from straight-forward tr(1)rse2007-05-211-1/+2
| | | | | | | | | | usage to an equivalent csh(1) usage as tr(1) stays in /usr/bin and /etc/rc.d/hostid has just the root filesystem (and this way mainly the tools in /bin) available. I've chosen csh(1) here as the string manipulation tools available in /bin is extremely limited and the (only) alternative ed(1) usage would have been a lot more complicated or even might require a temporary file.
* The standardized textual representation of UUIDs according to RFC 4122rse2007-05-211-2/+2
| | | | | | | | and ISO/IEC-9834-8:2005 is with LOWER-CASE hexadecimal characters only, so translate the (usually upper-case and this way not conforming) representation of the BIOS UUID when reading it. Also be more strict about the valid characters in the textual representation by checking for just the hexadecimal characters.
* o Implement the stop_boot subroutine [1]. This subroutine can be used bymtm2007-05-185-23/+4
| | | | | | | | | | | | | | | | | scripts in rc.d to stop rc(8) from booting into multi-user mode when a critical or severe error condition is encountered. o Modify scripts in etc/rc.d that already implemented this functionality independently. o Document it. [1] - This subroutine was implemented in FreeBSD in rc.d/fsck. I moved it to rc.subr(8). Our version differs slightly in that it takes an optional argument to stop the boot even if "autoboot" is not set. Obtained from: NetBSD MFC after: 2 weeks
* o Use the --detach option to kdc(8) instead of using the shellmtm2007-05-171-3/+3
| | | | | | | | | background operator '&'. PR: conf/102722 o No need to include $kerberos5_server_flags in $command_args as rc.subr(8) will take care of this.
* The precmd routine does not need to check whether the command should bemtm2007-05-173-24/+30
| | | | | | | | | | "forced". If some pre-condition is not met, it should fail as it normally does and rc.subr(8) will make the appropriate decision. Incidentally, the previous behaviour had a bug where the "force" flag was respected only when checking rc.conf(5) knobs. The flag was ignored when verifying the rpcbind(8) dependency. MFC after: 2 weeks
* Move options that do not have anything to do with routing out ofmtm2007-05-022-42/+43
| | | | | rc.d/routing and in to rc.d/netoptions. Also instead of saying "TCP options" say "IP options".
* When rc.d/NETWORKING included this script in its REQUIRE line, a circularmtm2007-05-021-1/+1
| | | | | | | | dependency was introduced because this script had rc.d/localpkg (which is *after* rc.d/NETWORKING) in its REQUIRE line. From an examination of its contents it seems that only the availability of a local filesystem is necessary for this script to function properly.
* When zfs dataset has jailed=on property, it won't be mounted withpjd2007-04-221-3/+34
| | | | | | | 'zfs mount -a' from the main system - this is by design, as mountpoint may be set to dangerous value. This all means, that such file system has to be mounted from within a jail. To make it easier, reorganize rc.d/zfs script so it can be used from within a jail.
* When org.freebsd:swap property is set to 'on' on a ZVOL, use is as a swappjd2007-04-151-0/+18
| | | | | | device. Discussed with: des
* Remove the shutdown keyword. It just adds noise to the shutdown process.des2007-04-131-1/+1
|
* - Create an empty /etc/zfs/exports file when zfs_enable="YES" and we don'tpjd2007-04-131-2/+5
| | | | | | | | | | NFS-share anything. This way we can safely start mountd with /etc/zfs/exports and mountd won't complain. Pointed out by: ceri - Move 'zfs volinit' before 'zfs mount -a' and 'zfs volfini' after 'zfs unmount -a'.
* mountd(8) was changed to only abort when all given exports files cannot bepjd2007-04-131-1/+1
| | | | open, so we not longer has to check if /etc/zfs/exports exists.
* o Look for a zfs(1) exports file only if it exists and is readable. Ifmtm2007-04-131-1/+2
| | | | | we don't do this and the file doesn't exist mountd(8) will abort. o The mountd(8) daemon creates a pidfile, so use it.
* If available, take UUID from smbios.system.uuid, if not fall back topjd2007-04-111-1/+18
| | | | | | | | | software-generated UUID. Store the result in /etc/hostid and use it in the future. Perform simple UUID format check, as there is a lot of hardware with broken UUIDs. The check should be improved to also eliminate fake UUIDs like 00000000-0000-0000-0000-000000000000. Requested by: many
* Add a pfsync_syncpeer option to /etc/defaults/rc.conf and rc.conf(5),keramida2007-04-101-1/+6
| | | | | | | | | | | which can be used to turn off multicast pfsync support, and enable the transmission of directed PFSYNC (IP protocol: 240) packets to a specific "sync peer" host. PR: conf/111225 Submitted by: Bas van Beek <bas@tobin.nl> Approved by: mtm, mlaier MFC after: 2 weeks
* Add rc.d/hostid script (turned on by default) which on first boot generatespjd2007-04-092-1/+81
| | | | | | | | | | | | UUID and stores it in /etc/hostid ($hostid_file) as well as sets kern.hostuuid and kern.hostid sysctls on every boot. Hostid can be reset using '/etc/rc.d/hostid reset' command. Hostid generation and setting can be turned off by setting variable hostid_enable to "NO" in /etc/rc.conf. Reviewed by: mlaier, rink, brooks, rwatson
* Apply "additional TCP options" earlier.des2007-04-092-2/+1
| | | | | Requested by: andre@ MFC after: 1 week
* FILESYSTEMS requires root, so requiring both of them is redundant.des2007-04-097-7/+7
|
* Add zfs to REQUIRE.des2007-04-091-1/+1
|
* - Add ZFS startup script.pjd2007-04-063-1/+40
| | | | | | | Submitted by: des - When starting mountd(8) and ZFS is enabled, add /etc/zfs/exports file. - Update rc.conf(5).
* Add rpc_statd_flags and rpc_lockd_flags options to allow options to bematteo2007-04-043-0/+24
| | | | | | passed to rpc.statd and rpc.lockd MFC after: 1 week
* Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocaldes2007-04-0221-20/+32
| | | | | | | | | | | | and takes over mountcritlocal's role as the early / late divider. This makes it far easier to add rc scripts which need to run early, such as a startup script for zfs, which is right around the corner. This change should be a no-op; I have verified that the only change in rcorder's output is the insertion of FILESYSTEMS immediately after mountcritlocal. MFC after: 3 weeks
* Instead of directly sourcing the firewall script, run it in a separate shell.mtm2007-04-022-2/+2
| | | | | | | | If the firewall script is sourced directly from the script, then any exit statements in it will also terminate the rc.d script prematurely. PR: conf/78762 MFC-After: 2 weeks
* Make subroutine names more conformant with other scripts in rc.d.mtm2007-03-311-4/+4
| | | | MFC After: 2 weeks
* Record rc.d/nfslocking dependency on rc.d/rpcbind.mtm2007-03-303-12/+54
| | | | | | PR: conf/105465 Submitted By: ru (with minor cosmetic change) MFC-After: 1 month
* Some rc.d commands (such as stop|restart etc.) won't automagically workmtm2007-03-301-0/+1
| | | | | | if we don't explicitly set the name of the executable program. PR: conf/104408
* Use "-ne" instead of "!=" for integer comparison.brooks2007-03-251-1/+1
|
* Having gone to the trouble of setting up a variable, we should use it.mtm2007-03-251-1/+1
|
* Make "/etc/rc.d/syscons start" correctly reload screensaver settings.mux2007-03-121-1/+1
| | | | | | | | | | The code looks for all the loaded screensaver modules, tries to kldunload them, and only loads the new one if kldstat's output shows that there aren't any left. However, the regexp looking for modules to unload was still searching according to the the old naming scheme, splash_<name>.ko, instead of <name>_saver.ko. MFC after: 3 days
* Allow background_fsck_delay to be set to a negative value which delaysbrooks2007-03-111-2/+14
| | | | | | | the background fsck indefinitely. This allows the administrator to run it at a convenient time. To support running it from cron, the forcestart argument now causes the fsck to start with no delay and all output to be suppressed.
* Get rid of chatter for failed commands if the filesystem is read-only.njl2007-03-031-5/+6
| | | | | | | | | | | Include /var/db/entropy-file in the reseeding if present. It is used for last-ditch efforts to save entropy and thus should also be used to seed the RNG when starting. Print a warning instead of an error if writing the file fails -- err() exits, preventing the umask from being restored. Also, since there's not much that can be done about it, notifying the user is all that's needed. MFC after: 2 weeks
* Use get_if_var() to retrieve interface specific values of dhclient_flagsbrooks2007-03-021-7/+3
| | | | | | | and background_dhclient. This allows interfaces who's names are not valid parts of shell variables and shortens the code. MFC after: 1 week
* pkill(1) and pgrep(1) have been moved to /bin so that they areyar2007-02-151-3/+3
| | | | available to rc.d scripts early in the boot sequence.
* Don't be paranoid about hostname(1) and order the things logically.yar2007-02-151-1/+1
| | | | Pointed out by: ceri
* Don't nag about unset $hostname if DHCP is in use.yar2007-02-151-1/+6
| | | | Pointed out by: ceri
* Handle the case when the admin forgot to set $hostname,yar2007-02-101-1/+10
| | | | | which can happen in new installations: advise to set the variable and refer to rc.conf(5).
* Add support for EtherChannel configuration to rc startup scripts.flz2007-02-091-0/+3
| | | | | | | | | | Note: This also deprecates "NO" as a way to specify an empty list of interfaces for gif_interfaces. PR: conf/104884 Submitted by: nork Harassed by: brd Discussed with: brooks, dougb
* Add the following knobs for quotas if they are enabled:mpp2007-01-201-3/+3
| | | | | | quotaon_flags - flags for the quotaon command quotaoff_flags - flags for the quotaoff command quotacheck_flags - flags for the quotacheck command
* Fix jail rc.d script privilege escalation via symlink attack againstsimon2007-01-111-12/+116
| | | | | | /var/log/console.log and mount points. Security: FreeBSD-SA-07:01.jail
* Re-work Cx handling to be per-cpu and asymmetrical, fixing support onnjl2007-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modern dual-core systems as well. - Parse the _CST packages for each cpu and track all the states individually, on a per-cpu basis. - Revert to generic FADT/P_BLK based Cx control if the _CST package is not present on all cpus. In that case, the new driver will still support per-cpu Cx state handling. The driver will determine the highest Cx level that can be supported by all the cpus and configure the available Cx state based on that. - Fixed the case where multiple cpus in the system share the same registers for Cx state handling. To do that, added a new flag parameter to the acpi_PkgGas and acpi_bus_alloc_gas functions that enable the caller to add the RF_SHAREABLE flag. This flag could also be useful to other callers (acpi_throttle?) in the tree but this change is not yet made. - For Core Duo cpus, both cores seems to be taken out of C3 state when any one of the cores need to transition out. This broke the short sleep detection logic. It is disabled now if there is more than one cpu in the system for now as it fixed it in my case. This quirk may need to be re-enabled later differently. - Added support to control cx_lowest on a per-cpu basis. There is still a generic cx_lowest to enable changing cx_lowest for all cpus with a single sysctl and for ease of use. Sample output for the new sysctl: dev.cpu.0.cx_supported: C1/1 C2/1 C3/57 dev.cpu.0.cx_lowest: C3 dev.cpu.0.cx_usage: 0.00% 43.16% 56.83% dev.cpu.1.cx_supported: C1/1 C2/1 C3/57 dev.cpu.1.cx_lowest: C3 dev.cpu.1.cx_usage: 0.00% 45.65% 54.34% hw.acpi.cpu.cx_lowest: C3 This work was done by Stephane E. Potvin with some simple reworking by myself. Thank you. Submitted by: Stephane E. Potvin <sepotvin / videotron.ca> MFC after: 2 weeks
* Jail_ip and jail_interface local variables were renamed to _ip and _interfaceflz2007-01-021-2/+2
| | | | | | | | in a previous commit to avoid namespace collisions, unfortunately I missed two of them. This leads to the ip alias being incorrectly removed in some cases when using the stop command. Reported by: Philipp Wuensche <cryx-freebsd@h3q.com>
OpenPOWER on IntegriCloud