summaryrefslogtreecommitdiff
path: root/localnetcfgchange
blob: 7728eeb1f0e3f440a2ccf0955793b201a30c833b (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