Add rfcomm_pppd_server rc script to allow start rfcomm_pppd(8) in server
mode at boot time. Multiple profiles can be started at the same time.
The whole idea is very similar to the ppp rc script.

Document Bluetooth knobs in rc.conf(5)

Set defaults for the rfcomm_pppd_server rc script
This commit is contained in:
emax 2008-04-15 20:31:14 +00:00
parent 6f4e88b7d4
commit 84078c0131
3 changed files with 121 additions and 2 deletions

View File

@ -355,6 +355,19 @@ bthidd_enable="NO" # Enable bthidd(8) (or NO)
bthidd_config="/etc/bluetooth/bthidd.conf" # bthidd(8) configuration file
bthidd_hids="/var/db/bthidd.hids" # bthidd(8) known HID devices file
rfcomm_pppd_server_enable="NO" # Enable rfcomm_pppd(8) in server mode (or NO)
rfcomm_pppd_server_profile="one two" # Profile to use from /etc/ppp/ppp.conf
#
#rfcomm_pppd_server_one_bdaddr="" # Override local bdaddr for 'one'
rfcomm_pppd_server_one_channel="1" # Override local channel for 'one'
#rfcomm_pppd_server_one_register_sp="NO" # Override SP and DUN register
#rfcomm_pppd_server_one_register_dun="NO" # for 'one'
#
#rfcomm_pppd_server_two_bdaddr="" # Override local bdaddr for 'two'
rfcomm_pppd_server_two_channel="3" # Override local channel for 'two'
#rfcomm_pppd_server_two_register_sp="NO" # Override SP and DUN register
#rfcomm_pppd_server_two_register_dun="NO" # for 'two'
### Miscellaneous network options: ###
icmp_bmcastecho="NO" # respond to broadcast ping packets

View File

@ -27,7 +27,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKING SERVERS \
pccard pcvt pf pflog pfsync \
powerd power_profile ppp pppoed pwcheck \
quota \
ramdisk ramdisk-own random rarpd resolv root \
ramdisk ramdisk-own random rarpd resolv rfcomm_pppd_server root \
route6d routed routing rpcbind rtadvd rwho \
savecore sdpd securelevel sendmail \
serial sppp statd swap1 \

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd October 27, 2007
.Dd April 9, 2008
.Dt RC.CONF 5
.Os
.Sh NAME
@ -3847,6 +3847,108 @@ autobridge_bridge0="tap* dc0 vlan[345]"
If set to
.Dq Li YES ,
enable support for sound mixer.
.It Va hcsecd_enable
.Pq Vt bool
If set to
.Dq Li YES ,
enable Bluetooth security daemon.
.It Va hcsecd_config
.Pq Vt str
Configuration file for
.Xr hcsecd 8 .
Default
.Pa /etc/bluetooth/hcsecd.conf .
.It Va sdpd_enable
.Pq Vt bool
If set to
.Dq Li YES ,
enable Bluetooth Service Discovery Protocol daemon.
.It Va sdpd_control
.Pq Vt str
Path to
.Xr sdpd 8
control socket.
Default
.Pa /var/run/sdp .
.It Va sdpd_groupname
.Pq Vt str
Sets
.Xr sdpd 8
group to run as after it initializes.
Default
.Dq Li nobody .
.It Va sdpd_username
.Pq Vt str
Sets
.Xr sdpd 8
user to run as after it initializes.
Default
.Dq Li nobody .
.It Va bthidd_enable
.Pq Vt bool
If set to
.Dq Li YES ,
enable Bluetooth Human Interface Device daemon.
.It Va bthidd_config
.Pq Vt str
Configuration file for
.Xr bthidd 8 .
Default
.Pa /etc/bluetooth/bthidd.conf .
.It Va bthidd_hids
.Pq Vt str
Path to a file, where
.Xr bthidd 8
will store information about known HID devices.
Default
.Pa /var/db/bthidd.hids .
.It Va rfcomm_pppd_server_enable
.Pq Vt bool
If set to
.Dq Li YES ,
enable Bluetooth RFCOMM PPP wrapper daemon.
.It Va rfcomm_pppd_server_profile
.Pq Vt str
The name of the profile to use from
.Pa /etc/ppp/ppp.conf .
Multiple profiles can be specified here.
Also used to specify per-profile overrides.
When the profile name contains any of the characters
.Dq Li .-/+
they are translated to
.Dq Li _
for the proposes of the override variable names.
.It Va rfcomm_pppd_server_ Ns Ao Ar profile Ac Ns _bdaddr
.Pq Vt str
Overrides local address to listen on.
By default
.Xr rfcomm_pppd 8
will listen on
.Dq Li ANY
address.
The address can be specified as BD_ADDR or name.
.It Va rfcomm_pppd_server_ Ns Ao Ar profile Ac Ns _channel
.Pq Vt str
Overrides local RFCOMM channel to listen on.
By default
.Xr rfcomm_pppd 8
will listen on RFCOMM channel 1.
Must set properly if multiple profiles used in the same time.
.It Va rfcomm_pppd_server_ Ns Ao Ar profile Ac Ns _register_sp
.Pq Vt bool
Tells
.Xr rfcomm_pppd 8
if it should register Serial Port service on the speficied RFCOMM channel.
Default
.Dq Li NO .
.It Va rfcomm_pppd_server_ Ns Ao Ar profile Ac Ns _register_dun
.Pq Vt bool
Tells
.Xr rfcomm_pppd 8
if it should register Dial-Up Networking service on the speficied
RFCOMM channel.
Default
.Dq Li NO .
.El
.Sh FILES
.Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact
@ -3885,12 +3987,14 @@ enable support for sound mixer.
.Xr amd 8 ,
.Xr apm 8 ,
.Xr atm 8 ,
.Xr bthidd 8 ,
.Xr chkprintcap 8 ,
.Xr chown 8 ,
.Xr cron 8 ,
.Xr dhclient 8 ,
.Xr ftpd 8 ,
.Xr geli 8 ,
.Xr hcsecd 8 ,
.Xr ifconfig 8 ,
.Xr inetd 8 ,
.Xr ipf 8 ,
@ -3920,6 +4024,7 @@ enable support for sound mixer.
.Xr quotaon 8 ,
.Xr rc 8 ,
.Xr rc.sendmail 8 ,
.Xr rfcomm_pppd 8 ,
.Xr route 8 ,
.Xr routed 8 ,
.Xr rpcbind 8 ,
@ -3927,6 +4032,7 @@ enable support for sound mixer.
.Xr rpc.statd 8 ,
.Xr rwhod 8 ,
.Xr savecore 8 ,
.Xr sdpd 8 ,
.Xr sshd 8 ,
.Xr swapon 8 ,
.Xr sysctl 8 ,