Closed AceSlash closed 7 years ago
Hi,
Can you post a copy of your installed /etc/init.d/chilli
up or just the snippet of lines 8 to 10.
The source file which generates the installed script contains
# Source function library. . /etc/rc.d/init.d/functions . @ETCCHILLI@/functions
I'm interested if @ETCCHILLI@/functions
has been translated correctly to the correct path for you.
Hello sevan, here is the begining of the file /etc/init.d/chilli
:
#!/bin/sh
#
# chilli - CoovaChilli
#
# chkconfig: 2345 65 35
# description: CoovaChilli
# Source function library.
. /etc/rc.d/init.d/functions
. /etc/chilli/functions
exec="/usr/sbin/chilli"
prog=$(basename $exec)
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/subsys/$prog
MULTI=$(ls /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=/var/run/chilli.pid
CONFIG=/etc/chilli.conf
if [ -n "$DHCPIF" ]; then
CONFIG=/etc/chilli/$DHCPIF/chilli.conf
pidfile=/var/run/chilli.$DHCPIF.pid
fi
[ -f $CONFIG ] || {
echo "$CONFIG not found"
exit 0
}
ok, can you delete the line which says . /etc/rc.d/init.d/functions
And try running the script & reporting back what happens
Thanks! Seems to work after running chilli radconfig
without the first function line, I now have the files local.conf main.conf hs.conf
Running chilli -fd
after that runs coovachilli. The fix seems simple in retrospect.
This almost worked. Unfortunately there also seems to be a bug with the daemon command as it doesn't seem to respect the config arguments.
I updated the following line in start()
daemon $exec -c $CONFIG
with the following
start-stop-daemon --start --quiet --pidfile $pidfile --exec $exec -- -c $CONFIG
All now seems to be working very well and systemd seems happy.
● chilli.service - SYSV: CoovaChilli
Loaded: loaded (/etc/init.d/chilli; bad; vendor preset: enabled)
Active: active (running) since Mon 2016-12-12 19:29:23 PST; 1s ago
Docs: man:systemd-sysv-generator(8)
Process: 66304 ExecStart=/etc/init.d/chilli start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/chilli.service
└─66381 /sbin/chilli -c /etc/chilli/eth1.30/chilli.conf
loaded (/etc/init.d/chilli; bad; vendor preset: enabled)
What's the bad referring to?
Well, it doesn't look 'good'. I have been curious about that also.
Log messages / journalctl -xe do not indicate any issues that I can tell.
I will do more testing today.
Without digging much deeper into the workings of systemd I cannot determine why this message is shown. From what I can tell the "bad" message is meaningless. Coova is working as expected and there is no operational impact that I have found.
Hello,
Similar issue as #263 and #116 (I don't understand why those tickets are closed by the way).
When chilli is installed, it creates a script
/etc/init.d/chilli
that should be used to create the configuration files (if I understand correctly), but this script depends on/etc/rc.d/init.d/functions
which is not present on Debian/Ubuntu systems:I created an ansible role to reproduce it:
Seems to me like coova-chilli cannot be used easily on modern Debian Family based systems, does this not qualify as a bug? Or is coova-chilli not supported on this type of distrib?