In Ubuntu, dnsmasq fails to run via the init.d/piratebox script but runs fine via /etc/init.d/dnsmasq.

Posted by bluMyst 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
My laptop is running Xubuntu 14.04.1 LTS. When I try to run

/opt/piratebox/init.d/piratebox start

I get a few errors, most of which seem inconsequential:

Empty tmp folder
rm: cannot remove '/opt/piratebox/tmp/': Is a directory

Then there's this:

 * Starting dnsmasq...
   ...fail!

I've copied this by hand from my laptop screen so there may be some spelling errors or something. I can't find the "Piratebox - Share Freely" AP on my other computer so I assume that one of these above errors is causing the script to fail.

When I run dnsmasq on its own with "/etc/init.d/dnsmasq start", it starts successfully, and I can stop it successfully too. So what's going wrong here?



Edited 1 time(s). Last edit at 12/11/2014 06:09AM by bluMyst.
Hi,
you need to stop the current running dnsmasq before launching PirateBox, because it starts up the dnsmasq for itself. You need to explicitly deactivate startup & stop after the installation of dnsmasq & lighttpd, because new package are enabled+started per default on Debian.

If you verified, that dnsmasq is not running before starting PirateBox, then I need a
 ifconfig -a 
and
iwconfig
output to verify that device names are correct.

best regads
Matthias
Hi Matthias! Here's a terminal session with everything you asked for:

[pastebin.com]

EDIT: Sorry about the spacing issues in the above link. No idea what caused that. Also it might take me a long time to reply to this thread because I'm leaving for a trip tomorrow.



Edited 2 time(s). Last edit at 12/12/2014 01:01AM by bluMyst.
Hi,
it totally looks like hostap has issues to run with the wifi card you have, because during the stop of the hostapd-step .

I think the next step is about to find why hostap won't stay "online", to do this please run:

# First paste the content of the configuration
cat /opt/piratebox/conf/hostapd.conf 
## Then launch hostapd
sudo hostapd  -d /opt/piratebox/conf/hostapd.conf

Please copy the command to pastbin or directly into the this topic.

Sorry for the late response, it was a crazy week.

Matthias


This is only my signature.
Haha, speaking of late responses... Hopefully this isn't considered a necropost or something at this point. Sorry about that! I was going on a vacation where there would be no WiFi and I was hoping to bring a piratebox along for the other guests.

Anyway, here's some more info.

Now that I know the problem has something to do with my wlan card I'm guessing that Linux just has bad driver support for it or something. Definitely wouldn't be the first time, and hence why I did lspci. Thanks for the help so far!
mh, you run the command without "sudo" - Were you logged in as root? Or did you tried it with sudo in front of, too?

regards Matthias