Merge pull request #994 from WereCatf/master

Try alternate NetworkManager-naming
pull/890/head
Colin Kuebler 2021-11-13 14:20:57 -05:00 committed by GitHub
commit a83a9d3683
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 2 deletions

View File

@ -26,7 +26,15 @@ setup () {
if test -d /etc/NetworkManager; then
echo "Stopping NetworkManager..."
sudo service network-manager stop
sudo service network-manager stop 2>/dev/null
if [ $? ]
then
sudo service NetworkManager stop 2>/dev/null
if [ $? ]
then
echo "** Failed to stop NetworkManager, AP may not work! **"
fi
fi
fi
echo "Configuring AP interface..."
@ -62,7 +70,15 @@ cleanup () {
if test -d /etc/NetworkManager; then
echo "Restarting NetworkManager..."
sudo service network-manager restart
sudo service network-manager restart 2>/dev/null
if [ $? ]
then
sudo service NetworkManager restart 2>/dev/null
if [ $? ]
then
echo "** Failed to restart NetworkManager: network may not be functional! **"
fi
fi
fi
}