Piratebox - Archbang

Posted by eennbb 
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
Piratebox - Archbang
November 06, 2014 06:11PM
Hello, I opened this topic because I did not find any mentions on arch installation.

After following the steps in the "how to install laptop" and correct some errors like "TabError: inconsistent use of tabs and spaces in indentation" in some of the .py files or the name of the wifi interfece, pirateBox not start successfully.

I have installed python2 and 3, i read that for some reason droopy does not work with version 3, so, i corrected this

#! / usr / bin / python> #! / usr / bin / python2

But I have a similar error, any ideas ???

[someuser@arch ~]$ /opt/piratebox/init.d/piratebox start
Starting script piratebox :
Generating hosts file ....
Generating dnsmasq.conf .....
Generating Environment-config for lighttpd .....
Empty tmp folder
rm: cannot remove ‘/opt/piratebox/tmp/’: Is a directory
Copy over design files
Starting hostap... :.
Setting up wlan:Bringing up wifi interface wlp3s0
Setting up wlp3s0
Starting dnsmasq... :.
Starting droopy...:start-stop-daemon: group 'nogroup' not found
failed!
Traceback (most recent call last):
File "psogen.py", line 11, in <module>
import messages, broadcast
File "/opt/piratebox/python_lib/messages.py", line 13
else:
^
TabError: inconsistent use of tabs and spaces in indentation
chown: invalid group: ‘nobody:nogroup’
chown: invalid group: ‘nobody:nogroup’
Starting lighttpd...:2014-11-06 14:06:16: (server.c.799) can't find groupname nogroup
(warning).


Sorry for my poor English...
Re: Piratebox - Archbang
November 06, 2014 08:40PM
Hi,
you need the following packages:

 'python2'
'lighttpd'
'bash'
'start-stop-daemon'
'iw'
'hostapd'
'dnsmasq'
'bridge-utils'
'avahi'
'lftp'
'wget'
'wireless_tools'
'netctl'
'perl'
'iptables'
'zip'
'unzip'
'cronie'

You need to install the start-stop-daemon. I think you need to custom-made this package using makepkg.
For RPi you can use that packages: [github.com]


You need the following systemd script [github.com]
Install the custom user+group

 grep -q nogroup /etc/group || groupadd nogroup
usermod -a -G nogroup nobody

But it seems you already covered a bunch of the problems already smiling smiley

Matthias
Re: Piratebox - Archbang
November 07, 2014 03:20AM
Ok, thanks for the fast reply.

A no mentioned detail, this is archbang on a laptop, Lenovo thinkpad T420.

I resolved the problem of "chown: invalid group: 'nobody: nogroup'" with

grep -q nogroup /etc/group || groupadd nogroup
usermod -a -G nogroup nobody

Only install the missing packages bridge-utils and lftp.

I keep getting this error.

Traceback (most recent call last):
File "psogen.py", line 11, in <module>
import messages, broadcast
File "/opt/piratebox/python_lib/messages.py", line 13
else:
^
TabError: inconsistent use of tabs and spaces in indentation


And a new one

chown: cannot access ‘/opt/piratebox/www/chat_content.html’: No such file or directory


Full start log

[eennbb@arch ~]$ /opt/piratebox/init.d/piratebox start
Starting script piratebox :
Generating hosts file .... 
Generating dnsmasq.conf .....
Generating Environment-config for lighttpd .....
Empty tmp folder
rm: cannot remove ‘/opt/piratebox/tmp/’: Is a directory
Copy over design files
Starting hostap... :.
  Setting up wlan:Bringing up wifi interface wlp3s0 
Setting up wlp3s0
Starting dnsmasq... :.
Starting droopy...:.
Traceback (most recent call last):
  File "psogen.py", line 11, in <module>
    import messages, broadcast
  File "/opt/piratebox/python_lib/messages.py", line 13
    else:
        ^
TabError: inconsistent use of tabs and spaces in indentation
chown: cannot access ‘/opt/piratebox/www/chat_content.html’: No such file or directory
Starting lighttpd...:2014-11-06 23:51:19: (log.c.118) opening errorlog '/opt/piratebox/tmp/error.log' failed: Permission denied
.

and full stop log

[someuser@arch ~]$ /opt/piratebox/init.d/piratebox stop
Stopping script piratebox:
Stopping hostap... :start-stop-daemon: warning: failed to kill 9895: No such process
.
Stopping dnsmasq...:.
Stopping lighttpd...:start-stop-daemon: warning: failed to kill 9931: No such process
 failed!
Stopping droopy... :.
Stopping wifi interface wlp3s0




Thanks for the support
Re: Piratebox - Archbang
November 07, 2014 05:10AM
Oh, I accidently did not remove the lftp ;- It was a leftover from my LibraryBox notes.

chown: cannot access ‘/opt/piratebox/www/chat_content.html’: No such file or directory
If a resulting error from the python error.

It seems something else is still not correctly setup with the permissions, please run the following command (one line)

/opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf part2

I'm curious about the python error, can you post me the content of
/opt/piratebox/version
please?

Matthias
Re: Piratebox - Archbang
November 07, 2014 11:07PM
Well, running this

/opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf part2

This error gone.

Starting lighttpd...:2014-11-06 23:51:19: (log.c.118) opening errorlog '/opt/piratebox/tmp/error.log' failed: Permission denied

But no this one

chown: cannot access ‘/opt/piratebox/www/chat_content.html’: No such file or directory

And the .py file error still ther

Traceback (most recent call last):
  File "psogen.py", line 11, in <module>
    import messages, broadcast
  File "/opt/piratebox/python_lib/messages.py", line 13
    else:
        ^
TabError: inconsistent use of tabs and spaces in indentation

/opt/piratebox/version

 piratebox-ws_1.0.1

Full start log

[someuser@arch ~]$ /opt/piratebox/init.d/piratebox start
Starting script piratebox :
Generating hosts file .... 
Generating dnsmasq.conf .....
Generating Environment-config for lighttpd .....
Empty tmp folder
rm: cannot remove ‘/opt/piratebox/tmp/’: Is a directory
Copy over design files
Starting hostap... :.
  Setting up wlan:Bringing up wifi interface wlp3s0 
Setting up wlp3s0
Starting dnsmasq... :.
Starting droopy...:.
Traceback (most recent call last):
  File "psogen.py", line 11, in <module>
    import messages, broadcast
  File "/opt/piratebox/python_lib/messages.py", line 13
    else:
        ^
TabError: inconsistent use of tabs and spaces in indentation
chown: cannot access ‘/opt/piratebox/www/chat_content.html’: No such file or directory
Starting lighttpd...:.

Full stop log, this time only one "fail to kill"

[someuser@arch ~]$ /opt/piratebox/init.d/piratebox stop
Stopping script piratebox:
Stopping hostap... :start-stop-daemon: warning: failed to kill 4940: No such process
.
Stopping dnsmasq...:.
Stopping lighttpd...:.
Stopping droopy... :.
Stopping wifi interface wlp3s0


And the interface

wlp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1492
        inet 192.168.77.1  netmask 255.255.255.0  broadcast 192.168.77.255
        ether XXangry smileyXangry smileyXangry smileyXangry smileyXangry smileyX  txqueuelen 1000  (Ethernet)
        RX packets 86211  bytes 109816005 (104.7 Micool smiley
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 66172  bytes 6841572 (6.5 Micool smiley
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Re: Piratebox - Archbang
November 09, 2014 10:52AM
Hi,

@hostapd error: did you change the interface name there as well? That might be the issue, while hostapd isn't started correctly

@python: I need to look at it in detail


Matthias