11 lines
324 B
Bash
Executable File
11 lines
324 B
Bash
Executable File
#!/bin/bash
|
|
# FIXME: hardcoded values
|
|
if [ -e /sys$1 ]; then
|
|
ANDROID_STATE=`cat /sys$1/state`
|
|
[ "$ANDROID_STATE" = "CONFIGURED" ] || exit 0
|
|
|
|
ifup rndis0
|
|
touch /var/lib/dhcp/dhcpd-rndis0.leases
|
|
/sbin/dhcpd rndis0 -d -pf /run/dhcpd-rndis0.pid -cf /etc/dhcpd-rndis0.conf -lf /var/lib/dhcp/dhcpd-rndis0.leases
|
|
fi
|