-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.hostapd.sh
executable file
·34 lines (30 loc) · 1.26 KB
/
init.hostapd.sh
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
#!/system/bin/sh
# *********************************************************************
# * ____ _____ _ *
# * / ___| ___ _ __ _ _ | ____|_ __(_) ___ ___ ___ ___ _ __ *
# * \___ \ / _ \| '_ \| | | | | _| | '__| |/ __/ __/ __|/ _ \| '_ \ *
# * ___) | (_) | | | | |_| | | |___| | | | (__\__ \__ \ (_) | | | | *
# * |____/ \___/|_| |_|\__, | |_____|_| |_|\___|___/___/\___/|_| |_| *
# * |___/ *
# * *
# *********************************************************************
# * Copyright 2010 Sony Ericsson Mobile Communications AB. *
# * All rights, including trade secret rights, reserved. *
# *********************************************************************
#
TAG="hostapd"
SRC="/system/etc/wifi/softap"
DST="/data/misc/wifi/hostapd"
check_file_exists()
{
/system/bin/log -t $TAG -p i "Checking $1 ..."
if `/system/bin/ls $1 > /dev/null`; then
return 0
else
return 1
fi
}
if ! check_file_exists $DST/hostapd.conf ; then
/system/bin/log -t $TAG -p i "Copying hostapd.conf to $DST ..."
/system/bin/cat $SRC/hostapd.conf > $DST/hostapd.conf
fi