summaryrefslogtreecommitdiff
path: root/localnetcfgchange
blob: 8988bc5de0b8f320b95500b2d7e7ad35d5859f91 (plain)
  1. #!/bin/sh
  2. # Copyright 2008 Jonas Smedegaard <dr@jones.dk>
  3. # Licensed as GNU General Public License (GPL) version 2.
  4. # Switch network config
  5. set -e
  6. flavor="$1"
  7. title=${2:-Network setup}
  8. text=${3:-Network setup succesfully changed. The change takes effect after next system restart.}
  9. if [ -f "/etc/network/interfaces.$1" ]; then
  10. gksudo -- /bin/cp -f "/etc/network/interfaces.$1" /etc/network/interfaces \
  11. && zenity --info --title "$title" --text "$text"
  12. fi