coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
518 stars 260 forks source link

scripts are hardcoded to use /etc #299

Open sevan opened 8 years ago

sevan commented 8 years ago

The scripts we ship assume that everything will be in /etc/chilli & stop working if you target a different prefix. The scripts should be adapted to inherit the sysconfdir & other relevant paths which would specified at configuration time before building.

tim-moody commented 7 years ago

somewhat related the statedir seems hardcoded to /usr/local/var/run which does not exist on raspian jessie on rpi3

chilli yields could not generate configuration (/usr/local/var/run/chilli.3288.cfg.bin which disappears after mkdir -p /usr/local/var/run

gbaligh commented 7 years ago

Hi, It's not hard coded. I think it's calculated from the prefix in the configure phase. In last, the path will be stored into DEFSTATEDIR, which is used in src/chilli.c line 429 to generate the binary configuration.

tim-moody commented 7 years ago

needs to point to /run or /var/run; prefix points to /usr.

also, adding --statedir /run to the chilli command does not change the outcome.

sevan commented 7 years ago

@gbaligh is right, localstatedir is handled by the scripts. The issue could be deemed that directory $localstatedir resolves to may not exist necessarily but the scripts do adapt as needed should you change the prefix. What I was referring to was having to manually editing files post install to accommodate a new location.