[25409] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r24960 - trunk/debathena/config/recovery-mode-config/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Feb 17 10:57:15 2011

Date: Thu, 17 Feb 2011 10:57:09 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201102171557.p1HFv9NE026022@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2011-02-17 10:57:09 -0500 (Thu, 17 Feb 2011)
New Revision: 24960

Modified:
   trunk/debathena/config/recovery-mode-config/debian/transform_netroot.debathena
Log:
Use ifup, because networking is probably already up

Modified: trunk/debathena/config/recovery-mode-config/debian/transform_netroot.debathena
===================================================================
--- trunk/debathena/config/recovery-mode-config/debian/transform_netroot.debathena	2011-02-17 15:40:25 UTC (rev 24959)
+++ trunk/debathena/config/recovery-mode-config/debian/transform_netroot.debathena	2011-02-17 15:57:09 UTC (rev 24960)
@@ -1,21 +1,20 @@
 #!/usr/bin/perl -p0
 
 my $replacement = <<'EOF';
-grep -q "^iface eth0 inet static$" /etc/network/interfaces
-if [ $? = 0]; then
+grep -q "^iface eth0$" /etc/network/interfaces
+if [ $? != 0]; then
+    echo "This machine doesn't appear to use /etc/network/interfaces."
+    echo "Falling back to dhclient instead."
+    /sbin/dhclient eth0
+else
     echo -n "Starting networking..."
-    # This works for now for Upstart, but who knows what the future will bring
-    /usr/sbin/invoke-rc.d networking start
+    ifup -a
     rv=$?
     sleep 1   # Some tg3 chipsets suck
     [ $rv = 0 ] && echo "ok" || echo "failed"
     echo -n "Starting local DNS server..."
     /usr/sbin/invoke-rc.d bind9 start
     [ $? = 0 ] && echo "ok" || echo "failed"
-else
-    echo "This machine doesn't appear to have a static IP configured."
-    echo "Falling back to dhclient instead."
-    /sbin/dhclient
 fi
 EOF
 s/^dhclient$/$replacement/gm or die;


home help back first fref pref prev next nref lref last post