summaryrefslogtreecommitdiffstats
path: root/src/net-rename
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2007-11-10 00:43:57 +0100
committerJames Rayner <james@archlinux.org>2007-11-10 00:43:57 +0100
commite9f9e4d54cb3afb6d78a12e85035a24d346c381d (patch)
treeb3971b8737ab56b6055d2440f5b78c74fc2adb25 /src/net-rename
downloadnetctl-e9f9e4d54cb3afb6d78a12e85035a24d346c381d.tar.gz
netctl-e9f9e4d54cb3afb6d78a12e85035a24d346c381d.tar.xz
Initial Import
Diffstat (limited to 'src/net-rename')
-rwxr-xr-xsrc/net-rename25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/net-rename b/src/net-rename
new file mode 100755
index 0000000..db2c461
--- /dev/null
+++ b/src/net-rename
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Renaming network devices"
+ ifrename -p -t
+ stat_done
+
+ add_daemon net-rename
+ ;;
+ stop)
+ rm_daemon net-rename
+ # No stop neccesary, but add one to look nice on shutdown.
+ /bin/true
+ ;;
+ restart)
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+# vim: set ts=4 et sw=4: