Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gentoo support #171

Closed
Kami-no opened this issue Mar 5, 2014 · 4 comments
Closed

Gentoo support #171

Kami-no opened this issue Mar 5, 2014 · 4 comments

Comments

@Kami-no
Copy link

Kami-no commented Mar 5, 2014

Mostly works great.

Not working:

  • IP;
  • DNS Leases;
  • Bandwith;
  • OS (in my case it's "3.11.2-hardened" and nothing about Gentoo)

BTW I'm using Gentoo + systemd so it might be a reason.

@tariqbuilds
Copy link
Owner

Interesting. I would love to add Gentoo to the list of fully supported OS'. It would be a great help if you could share the results of the following scripts from your web browser:

  1. [your linux-dash installtion]/sh/ip.php
  2. [your linux-dash installtion]/sh/dnsmasq-leases.php
  3. [your linux-dash installtion]/sh/bandwidth.php

Perhaps we can place fall-backs for Gentoo OS specific commands.

@Kami-no
Copy link
Author

Kami-no commented Mar 10, 2014

#1: There is no /bin/ip in Gentoo initially.
//$result2 = file_get_contents('http://ipecho.net/plain');
$result2 = file_get_contents('http://wtfismyip.com/text');
For some stupid reason ipecho.net banned in Russia. This site is ok.

/bin/ifconfig | /bin/grep -B1 "inet" | /usr/bin/awk '{ if ( $1 ==
"inet" ) { print $2 } else if ( $2 == "Link" ) { printf "%s:",$1 } }' |
/usr/bin/awk -F: '{ print $1","$3 }'
As soon as
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.13 netmask 255.255.255.0 broadcast 192.168.0.211
inet6 fe80::4a5b:39ff:fea5:db6c prefixlen 64 scopeid 0x20
inet6 1234::3a1 prefixlen 128 scopeid 0x0
ether 48:5b:39:a5:db:6c txqueuelen 1000 (Ethernet)
RX packets 211426 bytes 218117098 (208.0 MiB)
RX errors 0 dropped 2 overruns 0 frame 0
TX packets 141295 bytes 10302337 (9.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 2 collisions 0

#2 []
No DNSMasq in the system.

#3 cat: /sys/class/net/eth0/statistics/tx_bytes: No such file or directory
cat: /sys/class/net/eth0/statistics/rx_bytes: No such file or directory
cat: /sys/class/net/eth0/statistics/tx_bytes: No such file or directory
cat: /sys/class/net/eth0/statistics/rx_bytes: No such file or directory
{"tx":0,"rx":0}

@glasspelican
Copy link
Contributor

for the extra OS info to work you need to have lsb_release installed
It is a cross platform way to identify distro

@Kami-no
Copy link
Author

Kami-no commented Mar 21, 2014

https://bugs.gentoo.org/show_bug.cgi?id=107162
"the lack of a lsb version file or lsb_release command should imply that we're not lsb compliant in the slightest"

There is /etc/gentoo-release
Gentoo Base System release 2.2

But systemd users (not default in Gentoo) also have /etc/os-release
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo/Linux"
ANSI_COLOR="1;32"
HOME_URL="http://www.gentoo.org/"
SUPPORT_URL="http://www.gentoo.org/main/en/support.xml"
BUG_REPORT_URL="https://bugs.gentoo.org/"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants