I have written a shell script to remove all services excluding ethernet. The aim is to remove these services and PPPoE entries so the end user only sees ethernet under Preferences > Networking.
However, after a restart the services return. This also happens with just running the terminal command networksetup deletepppoeservice [servicename]
I presume there is a plist somewhere that repopulates these entries, however I have deleted networkInterfaces.plist to no effect.
Here is the code snippet in question:
SERVICE="Ethernet"
for NETSERV in ${networkService[@]}; do
if [[ "$NETSERV" != "$SERVICE" ]]; then
networksetup deletepppoeservice "$NETSERV";
fi
doneSERVICE="Ethernet"
for NETSERV in ${networkService[@]}; do
if [[ "$NETSERV" != "$SERVICE" ]]; then
networksetup deletepppoeservice "$NETSERV";
fi
done
Thanks.