annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
89
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
1 #!/bin/sh
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
2
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
3 # PROVIDE: MAIN
338
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
4 # REQUIRE: ADAPTATION FILESYSTEMS
89
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
5
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
6 . /etc/rc.subr
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
7 . /etc/network.subr
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
8
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
9 name="MAIN"
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
10 start_cmd="main_start"
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
11
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
12 main_start()
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
13 {
519
3ca79989db91 Set sysctl kern.hintmode to 2, to enable R/W access to kernel hints via kenv(1).
Aleksandr Rybalko <ray@ddteam.net>
parents: 389
diff changeset
14 # Copy hints to dynamic kenv
3ca79989db91 Set sysctl kern.hintmode to 2, to enable R/W access to kernel hints via kenv(1).
Aleksandr Rybalko <ray@ddteam.net>
parents: 389
diff changeset
15 sysctl kern.hintmode=2
338
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
16 # Disable saving core files
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
17 sysctl kern.coredump=0
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
18 # Allow routing/forwarding
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
19 sysctl net.inet.ip.forwarding=1
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
20 # XXX: for debug, breakpoint on Break sequence
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
21 sysctl debug.kdb.break_to_debugger=1
89
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
22
338
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
23 # Configure local interface
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
24 ifconfig lo0 127.0.0.1/8
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
25
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
26 # Run syslogd
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
27 syslogd -s
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
28
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
29 # Run empty MPD
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
30 mpd --background
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
31
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
32 # Run inetd
d91a937bfaa6 Enable dual run of rc.d scripts:
ray@terran.dlink.ua
parents: 297
diff changeset
33 inetd -wW
89
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
34 }
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
35
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
36 load_rc_config $name
af8a4754e914 SMALL_ tune
ray@terran.dlink.ua
parents:
diff changeset
37
389
5b491c71f689 * Move /etc/save_rc to /etc/rc.save_config.
Aleksandr Rybalko <ray@ddteam.net>
parents: 373
diff changeset
38 run_rc_command $*