summaryrefslogtreecommitdiff
path: root/localnetcfgchange
diff options
context:
space:
mode:
Diffstat (limited to 'localnetcfgchange')
-rwxr-xr-xlocalnetcfgchange18
1 files changed, 18 insertions, 0 deletions
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 <dr@jones.dk>
+# 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