Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
computer:raspberry_pi_ds-remote [2014/06/13 17:46]
tdobes [Part 3: General systemd + Wheezy hacks]
computer:raspberry_pi_ds-remote [2015/03/07 19:34]
tdobes [Part 4: DS Remote]
Line 130: Line 130:
 systemctl stop rsyslog.service systemctl stop rsyslog.service
 rm /​var/​log/​auth.log* /​var/​log/​daemon.log* /​var/​log/​debug /​var/​log/​kern.log* /​var/​log/​messages /​var/​log/​user.log* rm /​var/​log/​auth.log* /​var/​log/​daemon.log* /​var/​log/​debug /​var/​log/​kern.log* /​var/​log/​messages /​var/​log/​user.log*
- 
-# ** TODO:  Is this still needed in Jessie? ** 
-# Updates to systemd and udev should make these hacks unnecessary under Jessie, but Wheezy needs them 
-# udev should send "​stop"​ commands to systemd; not just start commands... also ensure that systemctl only gets called for interfaces set as "​auto"​ or "​allow-hotplug"​ 
-# We also send the stop command to systemd even if ifdown is already running to avoid a race condition with wpa_supplicant 
-cp -a /​lib/​udev/​net.agent /etc/udev/ 
-echo '--- /​etc/​udev/​net.agent'​ > /​tmp/​udev_net_unplug_systemd.patch 
-echo '+++ /​etc/​udev/​net.agent.new'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '@@ -48,7 +48,11 @@' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' ' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' ​    ​wait_for_interface lo' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' ​    if [ -e /​sys/​fs/​cgroup/​systemd ]; then' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​- ​     exec systemctl start ifup@${INTERFACE}.service'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo "​+ ​     if grep -q '"'​^\(allow-hotplug\|auto\)[[:​space:​]].*\<'"'"'"​$INTERFACE"'"'"'​\>'"'"'​ \' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​           /​etc/​network/​interfaces;​ then' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​       # this $INTERFACE is marked as "​allow-hotplug"​ or "​auto"'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​       exec systemctl start ifup@${INTERFACE}.service'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​     fi' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' ​    ​else'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' ​      exec ifup --allow=hotplug $INTERFACE'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' ​    ​fi'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '@@ -57,12 +61,16 @@' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' net_ifdown() {' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' ​    ​check_program /​sbin/​ifdown'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' ' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​- ​   if ps -C ifdown ho args | grep -q $INTERFACE; then' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​   if [ -e /​sys/​fs/​cgroup/​systemd ]; then' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​     exec systemctl stop ifup@${INTERFACE}.service'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​   else' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​     if ps -C ifdown ho args | grep -q $INTERFACE; then' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo $' \t''​debug_mesg "​Already ifdown-ing interface $INTERFACE"'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo $' \texit 0' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​- ​   fi' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​     fi' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' ' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​- ​   exec ifdown --allow=hotplug $INTERFACE'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​     exec ifdown --allow=hotplug $INTERFACE'​ >> /​tmp/​udev_net_unplug_systemd.patch 
-echo '​+ ​   fi' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' }' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' ' >> /​tmp/​udev_net_unplug_systemd.patch 
-echo ' do_everything() {' >> /​tmp/​udev_net_unplug_systemd.patch 
-patch -p0 < /​tmp/​udev_net_unplug_systemd.patch && rm /​tmp/​udev_net_unplug_systemd.patch 
-cp -a /​lib/​udev/​rules.d/​80-networking.rules /​etc/​udev/​rules.d/​ 
-sed -i '​s/​RUN+="​net.agent"/​RUN+="​\/​etc\/​udev\/​net.agent"/​g'​ /​etc/​udev/​rules.d/​80-networking.rules 
  
 # ifplugd should start up / shut down interfaces using systemd, not calling ifupdown directly # ifplugd should start up / shut down interfaces using systemd, not calling ifupdown directly
Line 214: Line 170:
 ===== Part 4: DS Remote ===== ===== Part 4: DS Remote =====
 <​code>​ <​code>​
-aptitude install python2.7+aptitude install python2.7 ​usbutils
  
 adduser remote adduser remote
computer/raspberry_pi_ds-remote.txt · Last modified: 2015/03/07 19:34 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS