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

option to disable updates on mobile (data) networks #42

Open
lectrode opened this issue Jun 14, 2021 · 0 comments
Open

option to disable updates on mobile (data) networks #42

lectrode opened this issue Jun 14, 2021 · 0 comments

Comments

@lectrode
Copy link
Owner

lectrode commented Jun 14, 2021

The update script should optionally not download or install updates when the only connection is mobile/data (most cellular services do not have actual unlimited data). This would still be allowed by default for security reasons, as well as to avoid impacting existing devices.

Preliminary search shows that networks provided by cellular carriers will have a qmi folder under the system network location.
example:

$ [[ -d "/sys/class/net/wwan0/qmi" ]] && echo this is a mobile data network

This is not the case on wired or wifi connections.

I should be able to use this in conjunction with the following to narrow down whether or not the only active connection is mobile.
ip --brief addr

better method:
cat /sys/class/net/wwan0/operstate

I'll also need to exclude loopback and anbox connections. All relevant network connections should have a device subfolder.

[[ -d "/sys/class/net/wlan0/device" ]] && echo not a loopback or bridge connection
@lectrode lectrode modified the milestone: 3.8 Aug 15, 2021
@lectrode lectrode modified the milestone: 3.9 Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant