Skip to content

Commit 4127cdc

Browse files
rkreshascottleibrand
authored andcommitted
Re-adding bnep0 check into oref0-setup.sh (#1179)
* Update oref0-setup.sh Adding bnep0 check back into script but writing it to the `/etc/network/interfaces.client` file instead of `/etc/network/interfaces` and doing so after the copy of `/etc/network/interfaces` to `/etc/network/interfaces.client` * Update oref0-setup.sh Spacing
1 parent 526b01f commit 4127cdc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/oref0-setup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,11 @@ if prompt_yn "" N; then
895895
sed -i.bak -e "s|DAEMON_CONF=$|DAEMON_CONF=/etc/hostapd/hostapd.conf|g" /etc/init.d/hostapd
896896
cp $HOME/src/oref0/headless/interfaces.ap /etc/network/ || die "Couldn't copy interfaces.ap"
897897
cp /etc/network/interfaces /etc/network/interfaces.client || die "Couldn't copy interfaces.client"
898+
if [ ! -z "$BT_MAC" ]; then
899+
printf 'Checking for the bnep0 interface in the interfaces.client file and adding if missing...'
900+
# Make sure the bnep0 interface is in the /etc/networking/interface
901+
(grep -qa bnep0 /etc/network/interfaces.client && printf 'skipped.\n') || (printf '\n%s\n\n' "iface bnep0 inet dhcp" >> /etc/network/interfaces.client && printf 'added.\n')
902+
fi
898903
#Stop automatic startup of hostapd & dnsmasq
899904
update-rc.d -f hostapd remove
900905
update-rc.d -f dnsmasq remove

0 commit comments

Comments
 (0)