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

☝🏻 Different behavior on macOS 13 Ventura #28

Open
Gems opened this issue Nov 3, 2022 · 0 comments
Open

☝🏻 Different behavior on macOS 13 Ventura #28

Gems opened this issue Nov 3, 2022 · 0 comments

Comments

@Gems
Copy link

Gems commented Nov 3, 2022

Launch Agents' behavior has been changed in the new version of macOS 13 Ventura.

Upon the network configuration change, the locationchanger script gets running several times: one time under the root user and the other time under the user registered the Launch Agent.

In case the ~/.locations/locations.conf configuration file is used to define an alias for a wireless network, the run under the root user doesn't see it because the CONFIG_FILE=$HOME/.locations/locations.conf path in case of root user gets resolved to /.locations/locations.conf which doesn't exist.

This leads to the "Automatic" location being resolved for the root user; therefore, the location gets changed back and forth from Automatic to the one specified in the ~/.locations/locations.conf.

I fixed it by moving the configuration file to /usr/local/etc/.locations/location.conf making it accessible for all the users, though it's not what would fit the original design.

The other way to fix it could be that the runs under the root user just get simply ignored. This wasn't an option for me because upon location change I got to re-route IP traffic and sudo is required for that. I could've done it with sudoers and more custom scripts though.

In summary, I suggest the latter for the amendments to the implementation.

Cheers ✌🏻
Ed

gileswells added a commit to gileswells/locationchanger that referenced this issue Dec 20, 2022
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

1 participant