[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r11366: Move macchanger / NetworkManager integration into separate i (in incognito/trunk: arch/x86 root_overlay/etc/init.d root_overlay/var/patches)



Author: double
Date: 2007-09-03 16:47:48 -0400 (Mon, 03 Sep 2007)
New Revision: 11366

Added:
   incognito/trunk/root_overlay/etc/init.d/macchanger
Modified:
   incognito/trunk/arch/x86/livecd-stage2.spec
   incognito/trunk/root_overlay/var/patches/NetworkManagerDispatcher.patch
Log:
Move macchanger / NetworkManager integration into separate init script for macchanger. Script from anonym.


Modified: incognito/trunk/arch/x86/livecd-stage2.spec
===================================================================
--- incognito/trunk/arch/x86/livecd-stage2.spec	2007-09-03 16:52:13 UTC (rev 11365)
+++ incognito/trunk/arch/x86/livecd-stage2.spec	2007-09-03 20:47:48 UTC (rev 11366)
@@ -35,6 +35,7 @@
 	squid|default
 	mixminion-smtp|default
 	external-config-setup|boot
+	macchanger|boot
 	NetworkManager|default
 
 # unionfs (genkernel 2.4.7) causes problems such as:

Added: incognito/trunk/root_overlay/etc/init.d/macchanger
===================================================================
--- incognito/trunk/root_overlay/etc/init.d/macchanger	                        (rev 0)
+++ incognito/trunk/root_overlay/etc/init.d/macchanger	2007-09-03 20:47:48 UTC (rev 11366)
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+
+depend() {
+	need autoconfig
+	before NetworkManager
+}
+
+start() {
+ 
+	# Randomize MAC address
+	if grep macchanger /proc/cmdline >/dev/null; then
+		ebegin "Randomizing MAC address(es)"
+		#for NIC in $(find /sys/devices -name "carrier" -a -not -path "*/virtual/*" | xargs -r -L 1 dirname | xargs -r -L 1 basename)
+		for NIC in eth0 eth1 eth2 eth3 eth4 wlan0 wlan1 ath0 ath1 ra00 ra01
+		do
+			macchanger -e ${NIC/*:/} >/dev/null 2>&1
+		done
+		eend 0
+	fi
+}
+


Property changes on: incognito/trunk/root_overlay/etc/init.d/macchanger
___________________________________________________________________
Name: svn:executable
   + *

Modified: incognito/trunk/root_overlay/var/patches/NetworkManagerDispatcher.patch
===================================================================
--- incognito/trunk/root_overlay/var/patches/NetworkManagerDispatcher.patch	2007-09-03 16:52:13 UTC (rev 11365)
+++ incognito/trunk/root_overlay/var/patches/NetworkManagerDispatcher.patch	2007-09-03 20:47:48 UTC (rev 11366)
@@ -1,5 +1,5 @@
 --- etc/init.d/NetworkManager.orig	2007-09-03 08:13:10.000000000 -0500
-+++ etc/init.d/NetworkManager	2007-09-03 09:16:22.000000000 -0500
++++ etc/init.d/NetworkManager	2007-09-03 15:27:21.000000000 -0500
 @@ -18,6 +18,7 @@
  sbindir=${exec_prefix}/sbin
  
@@ -16,27 +16,12 @@
  
  depend() {
  	need dhcdbd hald
-@@ -38,10 +40,30 @@
- 	if [ -e ${pidfile} ]; then
- 		rm -f ${pidfile}
- 	fi
-+
-+	# Randomize MAC address
-+	if grep macchanger /proc/cmdline >/dev/null; then
-+		ebegin "Randomizing MAC address(es)"
-+		#for NIC in $(find /sys/devices -name "carrier" -a -not -path "*/virtual/*" | xargs -r -L 1 dirname | xargs -r -L 1 basename)
-+		for NIC in eth0 eth1 eth2 eth3 eth4 wlan0 wlan1 ath0 ath1 ra0 ra1
-+		do
-+			macchanger -e ${NIC/*:/} >/dev/null 2>&1
-+		done
-+		eend 0
-+	fi
-+
- 	ebegin "Starting NetworkManager"
+@@ -42,6 +44,16 @@
  	start-stop-daemon --start --quiet --exec ${processname}
  	eend $?
  	echo $(/bin/pidof NetworkManager) > ${pidfile}
 +
++
 +	if [ -x ${NETWORKMANAGERDISP_BIN} ]; then
 +		ebegin "Starting NetworkManagerDispatcher"
 +		start-stop-daemon --start --quiet --exec ${NETWORKMANAGERDISP_BIN}
@@ -44,14 +29,16 @@
 +		echo $(/bin/pidof NetworkManagerDispatcher) > ${disppidfile}
 +	fi
 +
++
  }
  
  stop()
-@@ -52,4 +74,13 @@
+@@ -52,4 +64,16 @@
  	if [ -e ${pidfile} ]; then
  		rm -f $pidfile
  	fi
 +
++
 +	if [ -e ${disppidfile} ]; then
 +		ebegin "Stopping NetworkManagerDispatcher"
 +		start-stop-daemon --stop --quiet --exec ${NETWORKMANAGERDISP_BIN} --pidfile ${disppidfile}
@@ -60,4 +47,6 @@
 +			rm -f $disppidfile
 +		fi
 +	fi
++
++
  }