在运行OpenWrt 18.06.2。的Ubiquiti Unifi AC-Lite AP上安装了coova-chilli 1.3.1-svn 尝试使用以下命令启动辣椒时:
chilli --debug --fg
我总是遇到以下错误:
coova-chilli[27966]: options.c: 181: could not generate configuration (/var/run/chilli.27966.cfg.bin), sleeping one second
我在这个错误中停留了很长时间。我尝试在配置文件中进行更改,无济于事地安装和重新安装coova-chilli软件包。
答案 0 :(得分:0)
我认为您必须使用/etc/init.d/chilli start
命令将chilli作为服务首次运行。
以下是有效的chilli init.d服务代码。如果您没有服务启动文件,则将执行以下复制并将以下代码粘贴为“ /etc/init.d/”作为文件名“ chilli”。然后编辑您的配置路径。
#!/bin/sh
#
# chilli - CoovaChilli
#
# chkconfig: 2345 65 35
# description: CoovaChilli
# Source function library.
. /usr/local/etc/chilli/functions
exec="/usr/local/sbin/chilli"
prog=$(basename $exec)
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/subsys/$prog
MULTI=$(ls /usr/local/etc/chilli/*/chilli.conf 2>/dev/null)
[ -z "$DHCPIF" ] && [ -n "$MULTI" ] && {
for c in $MULTI;
do
echo "Found configuration $c"
DHCPIF=$(basename $(echo $c|sed 's#/chilli.conf##'))
export DHCPIF
echo "Running DHCPIF=$DHCPIF $0 $*"
sh $0 $*
done
exit
}
pidfile=/usr/local/var/run/chilli.pid
CONFIG=/usr/local/etc/chilli.conf
if [ -n "$DHCPIF" ]; then
CONFIG=/usr/local/etc/chilli/$DHCPIF/chilli.conf
pidfile=/usr/local/var/run/chilli.$DHCPIF.pid
fi
[ -f $CONFIG ] || {
echo "$CONFIG not found"
exit 0
}
start() {
echo -n $"Starting $prog: "
check_required
/sbin/modprobe tun >/dev/null 2>&1
echo 1 > /proc/sys/net/ipv4/ip_forward
[ -e /dev/net/tun ] || {
(cd /dev; mkdir net; cd net; mknod tun c 10 200)
}
writeconfig
radiusconfig
test ${HS_ADMINTERVAL:-0} -gt 0 && {
(crontab -l 2>&- | grep -v $0
echo "*/$HS_ADMINTERVAL * * * * $0 radconfig") | crontab - 2>&-
}
test ${HS_LANIF_KEEPADDR:-0} -eq 0 && ip address add 0.0.0.0 dev $HS_LANIF
daemon -- $exec -c $CONFIG
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
crontab -l 2>&- | grep -v $0 | crontab -
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
[ $retval -eq 0 ] && rm -f $PIDFILE
[ $retval -eq 0 ] && rm -f $RUN_D/$IPCFILE
[ $retval -eq 0 ] && rm -f $CMDSOCK
[ $retval -eq 0 ] && /bin/rm -f /usr/local/var/run/chilli.*.cfg.bin
return $retval
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
$1
;;
force-reload)
restart
;;
status)
status $prog
;;
try-restart|condrestart)
if status $prog >/dev/null ; then
restart
fi
;;
reload)
# If config can be reloaded without restarting, implement it here,
# remove the "exit", and add "reload" to the usage message below.
# For example:
# status $prog >/dev/null || exit 7
# killproc $prog -HUP
action $"Service ${0##*/} does not support the reload action: " /bin/false
exit 3
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
exit 2
esac
确保已安装守护程序。如果未安装,则显示未找到守护进程,请安装它。
答案 1 :(得分:-1)
很可能您的配置文件是错误的。在这里分享。