Hello!
I want to create an automatic startup files:
/etc/init.d/test
Code:
#----------------------------------------------------------------------------------------------------------------------
#!/bin/sh /etc/rc.common
START=50
username='uci get test.@interface[0].current'
password=`uci get test.@interface[$i].password`
ifname=`uci get test.@interface[$i].ifname`
start() {
test $username $password $ifname &
}
stop() {
killall test
}
restart() {
stop test
start test
}
#----------------------------------------------------------------------------------------------------------------------
Read automatically run the following file information:
/etc/config/test
Code:
#------------------------------------------------------------------------------------------------------------
config interface 'Default_configuration'
option ifname 'eth0'
option username 'user1234'
option password 'pass1234'
#------------------------------------------------------------------------------------------------------------
But unfortunately, this is wrong,
Can you help me to correct an error.
Thank you very much.
Best regards,
Tony