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

transfer_rate.sh contain ^M windows #28

Closed
kino3d opened this issue Jan 17, 2016 · 2 comments
Closed

transfer_rate.sh contain ^M windows #28

kino3d opened this issue Jan 17, 2016 · 2 comments

Comments

@kino3d
Copy link

kino3d commented Jan 17, 2016

the follow error generate a php error in the system info page

shell script must be converted to plain text to work, apache error log show

/var/www/fabui/script/transfer_rate.sh: 2: /var/www/fabui/script/transfer_rate.sh: ^M: not found
/var/www/fabui/script/transfer_rate.sh: 4: /var/www/fabui/script/transfer_rate.sh: ^M: not found
cat: /sys/class/net/eth0^M/statistics/rx_bytes: No such file or directory
cat: /sys/class/net/eth0^M/statistics/tx_bytes: No such file or directory
/var/www/fabui/script/transfer_rate.sh: 7: /var/www/fabui/script/transfer_rate.sh: ^M: not found
cat: /sys/class/net/eth0^M/statistics/rx_bytes: No such file or directory
cat: /sys/class/net/eth0^M/statistics/tx_bytes: No such file or directory
expr: non-integer argument
expr: non-integer argument

to solve
cd /var/www/fabui/script
apt-get install dos2unix
dos2unix transfer_rate.sh

only eth0 interface is queried that is only connected during first install or special cases
using wlan0 is better in general, you can query all interfaces and show results in
fabui/application/modules/maintenance/views/systeminfo/widget.php line 75, 79
add after sleep 1;

INTERFACE=wlan0

@marco-fabteam
Copy link
Contributor

@kriosmane said this is fixed in the next release.

@kino3d
Copy link
Author

kino3d commented Jan 26, 2016

Thanks @wtangent and @kriosmane this is a minor bug 👍

@kino3d kino3d closed this as completed Jan 26, 2016
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

2 participants