/etc/init.d/freedombox-create-uap0 is in freedombox-setup 0.8ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #!/bin/sh
### BEGIN INIT INFO
# Provides: freedombox-create-uap0
# Default-Start: 2 3 4 5
# Default-Stop:
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# X-Start-Before: $tor
# Short-Description: Create uap0 interface when needed
# Description:
# Script to create uap0 network interface when needed for mwifiex.
### END INIT INFO
LOGFILE=/var/log/freedombox-create-uap0.log
. /lib/lsb/init-functions
exec > $LOGFILE 2>&1
case "$1" in
start)
if ifconfig -a | grep -q mlan0 ; then
if ifconfig -a | grep -q uap0 ; then
log_success_msg "Interface uap0 already exists."
else
log_action_begin_msg "Creating uap0 interface"
iw phy phy0 interface add uap0 type __ap
log_action_end_msg 0
fi
else
log_success_msg "Interface mlan0 doesn't exist. Skip adding uap0."
fi
;;
stop|restart|force-reload)
# Do nothing
;;
*)
log_success_msg "Usage: /etc/init.d/freedombox-create-uap0 {start}"
exit 1
;;
esac
|