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

is_Pi() function MAC address range #1531

Merged
merged 1 commit into from Mar 17, 2020

Conversation

emrysr
Copy link
Contributor

@emrysr emrysr commented Mar 17, 2020

fix #1528

the reboot/restart buttons are currently set to show if ran on a raspberry pi. the is_Pi() function checks the device's mac address starts with the range associated to the raspberry pi foundation.

NOT TESTED ON RASPBERRY PI 4

added new mac address range for rpi4.

does the raspberry pi 4 has a different mac address range?? please comment if you know.

If you run this on your raspberry pi4 you should get your mac address for the ethernet and wifi network controllers...

ip address | egrep "^\s+link" | awk '{$1=$1};1' | cut -d' ' -f2 | tail -n+2

this command will list the mac addresses on your raspberry pi
(steps: find all lines starting with 'link', trim white space chars, display column 2, remove first line)
example output on rpi3:
image
** please dont comment with your full MAC address. It's unique to your device - the first three octets are fine to identify the company **

Found reference to dc:a6:32: as the OUI for raspberry pi trading (owned by raspberry pi foundation)

please comment if you have a raspberry pi 4 and your mac address doesn't start with dc:a6:32: so that I can amend this pull request with the correct values.

added new mac address range for rpi4

I assume that the raspberry pi 4 has a different mac address range.

found reference to `dc:a6:32:` as possible value for start of mac address range for raspberry pi foundation.

please comment if you have a raspberry pi 4 and your mac address doesn't start with `dc:a6:32:` so that I can ammend this pull request with the correct values.
@TrystanLea TrystanLea merged commit bd270f4 into master Mar 17, 2020
@TrystanLea
Copy link
Member

Great thanks @emrys, Works here on PI4!

@TrystanLea TrystanLea deleted the bug/1528-admin-missing-shutdown branch March 27, 2020 14:24
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

Successfully merging this pull request may close these issues.

RPI4: Missing shutdown / reboot buttons & hardware info on admin page
2 participants