2

How to start hostsapd service every time my compute starts

I have Ubuntu Server 13.10 and kernel 3.11

When I tried sudo update-rc.d hostapd defaults I got the following

System start/stop links for /etc/init.d/hostapd already exist.

and sudo service hostapd status shows that the service is not running

Videonauth
  • 33,355
  • 17
  • 105
  • 120
loo3y35
  • 511
  • 4
  • 9
  • 19
  • 1
  • @Parto Already tried that, doesn't work – loo3y35 Jul 21 '14 at 08:29
  • Is there anything useful in /var/log/syslog after "Starting advanced IEEE 802.11 management" if you try sudo service hostapd start manually? – Jos Jul 21 '14 at 09:21
  • sudo service hostapd start works perfectly, my only issue is starting the service automatically @Jos – loo3y35 Jul 21 '14 at 09:25
  • Try this: edit the file /etc/init.d/hostapd, remove the --quiet option in the start) section, and reboot. This should give you more informational messages in /var/log/syslog. – Jos Jul 21 '14 at 09:35
  • 1
    Does hostsapd need other services in up status to successfully complete its startup? – Lety Jul 21 '14 at 16:46
  • @Letizia I have no idea, how to check that? – loo3y35 Jul 22 '14 at 12:20
  • @Jos a message there says that the channel chosen is not supported, but when the computer is on I can use the same configuration file to run the service and it works. – loo3y35 Jul 22 '14 at 12:21
  • That sounds like a bug. Perhaps report this on Launchpad? – Jos Jul 22 '14 at 12:37
  • Run level init process starts ad static-network-up event. The event will not be emitted unless every interface configured as 'auto' in /etc/network/interfaces is up (see this link. Did hostapd need other kind of network up in order to complete its startup? Other point: verify in your /etc/rc2.d the number assigned to Sxxhostapd and which other services has upper value (they start after hostapd). Does this service necessary to hostapd startup? Sorry, but I don't know this service. – Lety Jul 22 '14 at 19:08

1 Answers1

1

Sounds like you might have gotten past this, as the daemon reports it is running when querying status.

My /etc/default/hostapd file did not define where to find the hostapd.conf file (as provided by Ubuntu 14.04.1 LTS). And so, I received no output when running sudo service hostapd start or sudo service hostapd status.

Once I directed the out-of-the-box init script to a configuration file, the service was able to start, and show status.

Maybe this was done on purpose to force you to think about configuration before the wireless services start.

Greg
  • 121