SmartAudio/package/allwinner/wifimanager/udhcpc_wlan0.init

37 lines
659 B
Bash
Executable File

#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=22
STOP=99
USE_PROCD=1
PROG=/sbin/udhcpc
start_service() {
procd_open_instance
if ps | grep [u]dhcpc; then
killall -q -KILL udhcpc
fi
if [ -n "$1" ]
then
procd_set_param command $PROG -i wlan0 -h When_you_like_AW -S -T 1
else
# host_name=`cat /mnt/UDISK/bt/bt_config.xml | grep local`
procd_set_param command $PROG -i wlan0 -h "SING-PV2" -S -T 1
fi
procd_close_instance
}
stop_service(){
procd_open_instance
if ps | grep [u]dhcpc; then
killall -q -KILL udhcpc
fi
procd_close_instance
}
restart(){
stop "$@"
start "$@"
}