From 4d889b8d14354c9a45aad19f3e854a1d70487d28 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 17 Jan 2008 21:42:37 +0000 Subject: New script to swithc network config. --- localnetcfgchange | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 localnetcfgchange diff --git a/localnetcfgchange b/localnetcfgchange new file mode 100755 index 0000000..7728eeb --- /dev/null +++ b/localnetcfgchange @@ -0,0 +1,18 @@ +#!/bin/sh + +# Copyright 2008 Jonas Smedegaard +# Licensed as GNU General Public License (GPL) version 2. + +# Switch network config + +set -e + +flavor="$1" + +title=${2:-Network setup} +text=${3:-Network setup succesfully changed. The change takes effect after next system restart.} + +if [ -f "/etc/network/interfaces.$1" ]; then + gksudo "/bin/cp -f \"/etc/network/interfaces.$1\" /etc/network/interfaces" \ + && zenity --info --title "$title" --text "$text" +fi -- cgit v1.2.3