19 lines
398 B
Bash
19 lines
398 B
Bash
#!/bin/sh
|
|
# x13s-setup wlan <interface>
|
|
# x13s-setup bluetooth
|
|
|
|
[ -r /etc/default/x13s ] && . /etc/default/x13s
|
|
|
|
case "$1" in
|
|
wlan)
|
|
if [ -n "$WLAN_MAC" ] && command -v ip >/dev/null 2>&1; then
|
|
exec ip link set dev "$2" address "$WLAN_MAC"
|
|
fi
|
|
;;
|
|
bluetooth)
|
|
if [ -n "$BLUETOOTH_MAC" ] && command -v btmgmt >/dev/null 2>&1; then
|
|
exec btmgmt --index 0 public-addr "$BLUETOOTH_MAC"
|
|
fi
|
|
;;
|
|
esac
|