view profiles/SMALL_/files/etc/rc.d/MAIN @ 519:3ca79989db91

Set sysctl kern.hintmode to 2, to enable R/W access to kernel hints via kenv(1).
author Aleksandr Rybalko <ray@ddteam.net>
date Sat, 07 Nov 2015 01:15:52 +0200
parents 5b491c71f689
children
line wrap: on
line source
#!/bin/sh

# PROVIDE: MAIN
# REQUIRE: ADAPTATION FILESYSTEMS

. /etc/rc.subr
. /etc/network.subr

name="MAIN"
start_cmd="main_start"

main_start()
{
	# Copy hints to dynamic kenv
	sysctl kern.hintmode=2
	# Disable saving core files
	sysctl kern.coredump=0
	# Allow routing/forwarding
	sysctl net.inet.ip.forwarding=1
	# XXX: for debug, breakpoint on Break sequence
	sysctl debug.kdb.break_to_debugger=1

	# Configure local interface
	ifconfig lo0 127.0.0.1/8

	# Run syslogd
	syslogd -s

	# Run empty MPD
	mpd  --background

	# Run inetd
	inetd -wW
}

load_rc_config $name

run_rc_command $*