Commit Graph

424 Commits

Author SHA1 Message Date
Nate Lawson
c5f3bff0be Remove only X[0-9]-lock. 2004-01-27 18:19:32 +00:00
Maxime Henrion
226b72f862 Move the test used to determine whether IPFilter is loaded or not
into its own function to avoid a small duplication of code.
2004-01-24 20:40:11 +00:00
Mike Makonnen
fe93d19e19 Remove an extraneous semicolon (;;). 2004-01-17 11:52:37 +00:00
Mike Makonnen
82e3bcc0d5 Use the checkyesno routine instead of a case statement to
check an rc.conf(5) variable. This is in line with rc.d style.
2004-01-17 11:31:15 +00:00
Mike Makonnen
e27b3ff8b6 Remove checks for the FreeBSD OS. 2004-01-17 11:25:16 +00:00
Mike Makonnen
e90a5063a4 Make conform to general rc.d style. 2004-01-17 11:19:01 +00:00
Mike Makonnen
f2bdfc7dc7 o Rename the start command to conform to rc.d style.
o Move the additional commands list to the end of the
  variable initialization to conform to rc.d style
2004-01-17 11:15:04 +00:00
Mike Makonnen
143d8a9539 Simplify setting of securelevel. 2004-01-17 11:11:18 +00:00
Mike Makonnen
62e02b0dad Remove variables whose sole purpose was to make easier to
work with the NetBSD specific stuff.
2004-01-17 11:06:41 +00:00
Mike Makonnen
82387f41ed Luke Mewburn has indicated that they (NetBSD) are not interested
in keeping the scripts under rc.d in sync with us. So, remove
NetBSD specific stuff (which made our scripts more complicated
than necessary).

The NetBSD ident string will be left intact, both for history and
also incase we wish to pull in future versions.
2004-01-17 10:59:43 +00:00
Mike Makonnen
9dd342fee6 Luke Mewburn has indicated that they (NetBSD) are not interested
in keeping the scripts under rc.d in sync with us. So, remove
NetBSD specific stuff (which made our scripts more complicated
than necessary).

The NetBSD ident string will be left intact, both for history and
also incase we wish to pull in future versions.
2004-01-17 10:40:45 +00:00
Mike Makonnen
1afce00360 Luke Mewburn has indicated that they (NetBSD) are not interested
in keeping the scripts under rc.d in sync with us. So, begin removal
of NetBSD specific stuff (which made our scripts more complicated
than necessary), starting with the NetBSD KEYWORD.
2004-01-17 10:16:38 +00:00
Brooks Davis
f0e62d30bd Don't run newaliases if sendmail_enable=NONE.
Submitted by:	Matt Peterson <matt at peterson dot org>
Approved by:	silence on freebsd-rc
2004-01-05 19:14:47 +00:00
Sergey Babkin
dfa244fc22 Added support for intelligent handling of DST transitions in cron.
reviewed by: imp
2003-12-25 23:29:19 +00:00
Nate Lawson
3662033599 Add power_profile, a script that changes the ACPI CPU Cx idle state and/or
the throttling state in response to line transitions.  Future plans
include adding support for CPU frequency changes.

Add a devd.conf entry for calling this script.

The default values for this are:
performance_cx_lowest="HIGH"       # Use HLT (C0) online
performance_throttle_state="HIGH"  # 100% (no throttling)
economy_cx_lowest="LOW"            # Use the lowest Cx state possible
economy_throttle_state="HIGH"      # 100% (no throttling)
2003-12-18 04:39:57 +00:00
Sean Chittenden
12335de1f5 Backout ataraid rcng script. I must have missed ar0 in my scan of /dev
after my first reboot because sure enough, I'm seeing it there now and
ata(4) is doing the right thing(TM).

Pointed out by:	des
2003-12-14 13:36:36 +00:00
Sean Chittenden
7e6b2a1467 Add a script that allows software RAID sets to be created before file
systems are mounted.  An example set of entries for /etc/rc.conf:

ataraid_enable="YES"
ataraid_devices="ar0"
ataraid_ar0_set="ad2 ad3"
ataraid_ar0_type="RAID1"

Because there is no "correct" way of doing ATA raid (ie, geom vs.
atacontrol vs. vinum) that is bikeshed proof, this rcng script stays within
the bounds of atacontrol and assumes that other RAID solutions for GEOM or
vinum will end up in a different rcNG script.

Reviewed by:	green
2003-12-14 09:42:02 +00:00
Peter Wemm
a0ac36d5f1 Change rc.d/syscons to not need /usr/sbin/ispcvt to exist. This should
make it work for all non-i386 syscons platforms.
2003-12-10 15:48:49 +00:00
Mike Makonnen
ed0bd3657c o Rename devfs_link() to make_symlink() and turn it into a generic
symlinking routine.
o Modify rc.d/jail to create its own symlink relative to the jail's
  filesystem
2003-12-09 08:51:11 +00:00
Mike Makonnen
16805414e4 If fdescfs(5) is mounted in a jail unmount it before devfs(5).
Submitted by:	"Scot W. Hetzel" <hetzelsw@westbend.net>
2003-12-09 08:32:43 +00:00
Mike Makonnen
71516efe7b If rc.d/mountcritlocal is unable to mount local filesystems,
then immediately terminate the shell (during boot this
also terminates the parent rc(8) shell). This was the pre-rcNG behaviour.

Also, remove an extraneous mount /.

PR:		conf/57659
Submitted by:	yar (with modifications)
2003-12-09 08:17:33 +00:00
Mike Makonnen
7645a316db Redirect rc(8) output to a file in the jail's /var/log directory.
Previously it was redirected to /dev/null.

Submitted by: phk
2003-12-09 08:09:04 +00:00
Mike Makonnen
c4818267a4 When clearing /tmp, X11 lock and temporary files are special.
Remove them unconditionaly.

PR:		bin/59065
Approved by:	re (scottl)
2003-12-01 16:35:57 +00:00
Bruce M Simpson
a2ed0b4e3d Add a means of starting an IKE daemon from the rc system at an appropriate
time during the boot process. This is needed in the case where NFS mounts
from servers reachable only via IPSEC are in /etc/fstab.

PR:		conf/42497
Submitted by:	Volker Stolz
Approved by:	re (rwatson)
2003-11-28 17:28:42 +00:00
Maxime Henrion
0bb582b106 Change a bogus -n parameter to echo(1). 2003-11-03 17:03:01 +00:00
Hajimu UMEMOTO
2fa02b748e install address selection policy into kernel when there is
/etc/ip6addrctl.conf.
following sample of ip6addrctl.conf is a good default:

#Prefix       Precedence Label
::1/128               50     0
::/0                  40     1
2002::/16             30     2
::/96                 20     3
::ffff:0:0/96         10     4
2003-10-30 17:55:52 +00:00
Doug Barton
809a0e6290 * Remove the OS specific bits, since NetBSD isn't interested in
porting this stuff back.

* Test /etc/motd for writability before trying to update it. This is
especially useful when /etc/ is mounted ro, like on a diskless boot.
(Thanks to phk for the idea on this one.)

* Make the "updating" message reflect what actually happens.
2003-10-13 08:44:07 +00:00
Doug Barton
76f9428757 Remove trailing whitespace 2003-10-13 08:20:55 +00:00
Doug Barton
9f29b7170b Update references to rc.diskless[12] 2003-10-13 08:18:05 +00:00
Kris Kennaway
63d707097e Bump default /etc size from 2MB to 5MB to deal with bloat^Wgrowth in
the size of /etc.
2003-10-12 00:19:45 +00:00
Poul-Henning Kamp
e0f8a7e7af Fix typo.
Spotted by:	"Bjoern A. Zeeb" <bzeeb@zabbadoz.net>
2003-10-03 19:57:58 +00:00
Poul-Henning Kamp
027ec595a1 More checking if kenv actually know something.
Guard against test(1)-unfriendly outputs from kenv.
2003-10-03 19:07:31 +00:00
Poul-Henning Kamp
91c1935fe5 In case we have no /etc/resolv.conf, don't try to make it out of
thin blue air if the kenv doesn't have any info.

This improves the truth value of the comment above significantly and
reduces the bogous output on the console considerably.
2003-10-03 18:26:33 +00:00
Maxime Henrion
c7b33a84a4 Fix bogon in ipfilter_resync() introduced in my last commit.
Spotted by:	Gennady Proskurin <gpr@nvnpp.vrn.ru>
2003-10-03 11:57:43 +00:00
Maxime Henrion
50e8b3f340 A number of fixes/enhancements for the ipfilter rc script:
- Use a more robust check to determine if we need to load ipl.ko.
- Don't try to run ipf -E if ipfilter is already enabled.  Look at
  the net.inet.ipf.fr_running sysctl to figure this out.  This fixes
  a warning message about ipfilter being already initialized.
- Only one ipf -E command is needed.  We don't need an extra one for
  the -6 case which would only print a warning message about ipfilter
  being already initialized.
- Fix one occurence where we were running /sbin/ipf directly without
  using the ${ipfilter_program} variable if set.
- In ipfilter_stop(), don't try to save the firewall state tables if
  ipfilter is disabled.  Similarly, don't try to disable it if it's
  already disabled.  This fixes some more error messages.
2003-09-27 13:50:47 +00:00
Martin Blapp
0c6d0171e6 Get rid of a nasty error message that tells us
dhclient couldn't get killed.

If we execute 'dhclient -r', dhclient gets already
killed, so there is no need to do it twice. Only do
this if we really have to release some leases.

Reviewed by:	silence on freebsd-rc@yahoogroups.com
2003-09-16 02:56:13 +00:00
Mike Makonnen
c09d2c2bc2 Remove deprecated files no longer neccesary as part of rc.d. Include
a note in UPDATING about removing them from current installations.
2003-08-29 13:25:08 +00:00
Mike Makonnen
66338db9e9 Enhance the jail start/stop script.
o The following additional configuration attributes of a jail can be
  controlled from rc.conf:
	- mounting devfs(5)
	- mounting fdescfs(5)
	- mounting procfs(5)
	- custom devfs(8) ruleset
	  If no ruleset is specified, the default jail ruleset is used.

o The output of executing /etc/rc in the jail is now redirected
  to /dev/null. Instead, the hostname of the jail is echoed if
  the jail(8) command exited successfully. If the output is wanted
  it can probably be redirected to a file (/var/run/$jail maybe)
  instead of /dev/null.

Submitted by:	Scot W. Hetzel <hetzels@westbend.net>
		with modifications by Jens Rehsack <rehsack@liwing.de>
		and me.
2003-08-24 06:29:32 +00:00
Mike Makonnen
130112f793 Add a general mechanism for creating and applying
devfs(8) rules in rc(8). It is most useful for applying
rules to devfs(5) mount points in /dev or inside jails.
The following line of script is sufficient to
mount a relatively useful+secure devfs(5) in a jail:

	devfs_mount_jail /some/jail/dev

Some new shell routines available to scripts that source
rc.subr(5):
	o devfs_link		- Makes it a little easier to create symlinks
	o devfs_init_rulesets	- Create devfs(8) rulesets from devfs.rules
	o devfs_set_ruleset	- Set a ruleset to a devfs(5) mount
	o devfs_apply_ruleset	- Apply a ruleset to a devfs(5) mount
	o devfs_domount		- Mount devfs(5) and apply some ruleset
	o devfs_mount_jail	- Mount devfs(5) and apply a ruleset
				  appropriate to jails.

Additional rulesets can be specified in /etc/devfs.rules.
If the devfs_system_ruleset variable is defined in rc.conf
and it contains the name of a ruleset defined in /etc/defaults/devfs.rules
or user supplied rulesets in /etc/devfs.rules then that ruleset will
be applied to /dev at startup by the /etc/rc.d/devfs script. It can
also be applied post-startup:

	/etc/rc.d/devfs start

This is a more flexible mechanism than the previous method of using
/etc/devfs.conf. However, that method is still available.

Note: since devfs(8) doesn't provide any way for creating symlinks
as part of a ruleset, anyone wishing to create symlinks in a devfs(5)
as part of the bootup sequence will still have to rely on /etc/devfs.conf.
2003-08-20 06:15:18 +00:00
Jun Kuriyama
7a79a9d713 Quote $jail_exec with double-quote to avoid "[: unexpected operator". 2003-08-19 03:49:30 +00:00
Gordon Tetlow
a4e945c1f9 Prepend /lib to the search order for libraries. 2003-08-17 07:49:11 +00:00
Hartmut Brandt
8b296e19bd Now that routes for IP over ATM may look much more complex than before,
use the atmconfig(8) utility instead of route(8) to install those routes.
For this we need a new rc.conf variable natm_static_routes that works
just like static_routes except that the referenced routes use the syntax
of atmconfig(8).

Okay'ed by:	mtm
2003-08-14 15:27:32 +00:00
Max Khon
4bab0ee528 Correct typo in Matt's name. 2003-08-07 21:06:32 +00:00
Mike Makonnen
41f0e9d32c Rename localdaemons to localpkg.
The original name was really a mistake since
/usr/local/etc/rc.d scripts can (and usually do) start
more than just daemons. Even the output in the script
uses 'local packages.' Also, the term 'local daemons' is
used by rc.d/local, which was etc/rc.local of rcOG fame.
No repo-copy because there isn't much history to save.
I will remove localdaemons shortly with all the other
files that don't belong in rc.d anymore.

Discussed with:	dougb, freebsd-rc@yahoogroups.com
2003-08-06 00:35:13 +00:00
Mike Makonnen
770086e47b Apply some sort of order to the FILES list. 2003-07-30 20:05:20 +00:00
Mike Makonnen
81ad367d25 Add two files (early.sh and gbde) that previously were not
hooked up to the build.
2003-07-30 19:53:40 +00:00
Mike Makonnen
7a34a70b8d tty whacking should occur early, but not so early that the
required commands are not on a mounted file system.

Noticed by: bde
2003-07-30 18:53:59 +00:00
Hartmut Brandt
c5670cc3b1 Convert the atm{2,3}.sh rc scripts to normal rc.d scripts. Add support
for the harp(4) pseudo driver and for loadable native HARP drivers
(like hfa_pci).

To use harp(4) the rc variable natm_interfaces must be set to the
list of NATM interfaces to be used for HARP. These interfaces
will be brought up with ifconfig and the harp(4) will be loaded.

To use loadable native HARP drivers atm_load must be set to
the list of drivers to load.

Reviewed by:	mtm, gordon (partly)
2003-07-28 13:30:42 +00:00
Martin Blapp
0888a8766e Always start dhclient in the background.
Reviewed by:	mtm
2003-07-28 08:15:52 +00:00
Martin Blapp
60613d0ae7 Add -dynamic to natd if dhcp is used for the natd interface.
Kill natd in stop().

Reviewed by:	mtm
2003-07-27 20:34:30 +00:00