[25408] in Source-Commits

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

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

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

Date: Thu, 17 Feb 2011 10:40:25 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201102171540.p1HFePAf023041@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:40:25 -0500 (Thu, 17 Feb 2011)
New Revision: 24959

Added:
   trunk/debathena/config/recovery-mode-config/debian/transform_netroot.debathena
Modified:
   trunk/debathena/config/recovery-mode-config/debian/athena-update
   trunk/debathena/config/recovery-mode-config/debian/changelog
   trunk/debathena/config/recovery-mode-config/debian/control
   trunk/debathena/config/recovery-mode-config/debian/rules
Log:
In recovery-mode-config:
  * Divert /usr/share/recovery-mode/options/netroot so that it actually
    works rather than just running dhclient and hoping for the best
  * Fix typo in athena-update


Modified: trunk/debathena/config/recovery-mode-config/debian/athena-update
===================================================================
--- trunk/debathena/config/recovery-mode-config/debian/athena-update	2011-02-16 19:01:44 UTC (rev 24958)
+++ trunk/debathena/config/recovery-mode-config/debian/athena-update	2011-02-17 15:40:25 UTC (rev 24959)
@@ -30,7 +30,7 @@
 if [ "$answer" = "y" ]; then
     echo "The workstation will now shut down.  You can then turn it back on."
     echo "(Press Enter to continue)"
-    ready dummy
+    read dummy
     /sbin/poweroff
 fi
 echo "Please shut down as soon as possible.  Press Enter to return to the menu."

Modified: trunk/debathena/config/recovery-mode-config/debian/changelog
===================================================================
--- trunk/debathena/config/recovery-mode-config/debian/changelog	2011-02-16 19:01:44 UTC (rev 24958)
+++ trunk/debathena/config/recovery-mode-config/debian/changelog	2011-02-17 15:40:25 UTC (rev 24959)
@@ -1,3 +1,11 @@
+debathena-recovery-mode-config (1.3) unstable; urgency=low
+
+  * Divert /usr/share/recovery-mode/options/netroot so that it actually
+    works rather than just running dhclient and hoping for the best
+  * Fix typo in athena-update
+
+ -- Jonathan Reed <jdreed@mit.edu>  Thu, 17 Feb 2011 10:39:47 -0500
+
 debathena-recovery-mode-config (1.2.1) unstable; urgency=low
 
   * Catch SIGINT in athena-renumber so that sulogin doesn't get upset

Modified: trunk/debathena/config/recovery-mode-config/debian/control
===================================================================
--- trunk/debathena/config/recovery-mode-config/debian/control	2011-02-16 19:01:44 UTC (rev 24958)
+++ trunk/debathena/config/recovery-mode-config/debian/control	2011-02-17 15:40:25 UTC (rev 24959)
@@ -8,7 +8,10 @@
 Package: debathena-recovery-mode-config
 Architecture: all
 Depends: ${misc:Depends}, debathena-auto-update (>= 1.15~), debathena-machtype, perl
-Description: Adds two options to recovery-mode menu
+Provides: ${diverted-files}
+Conflicts: ${diverted-files}
+Description: Adds options to recovery-mode menu
  This package adds two options to the recovery-mode menu.  One option
  forces an immediate update of the workstation, and the other allows
- easy reconfiguration of the network.
+ easy reconfiguration of the network.  It also diverts the 'netroot'
+ option so that it's actually functional in the MIT environment.

Modified: trunk/debathena/config/recovery-mode-config/debian/rules
===================================================================
--- trunk/debathena/config/recovery-mode-config/debian/rules	2011-02-16 19:01:44 UTC (rev 24958)
+++ trunk/debathena/config/recovery-mode-config/debian/rules	2011-02-17 15:40:25 UTC (rev 24959)
@@ -1,3 +1,8 @@
 #!/usr/bin/make -f
 
+DEB_DIVERT_EXTENSION = .debathena
+DEB_TRANSFORM_FILES_debathena-recovery-mode-config += \
+        /usr/share/recovery-mode/options/netroot
+
 include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/config-package.mk

Added: trunk/debathena/config/recovery-mode-config/debian/transform_netroot.debathena
===================================================================
--- trunk/debathena/config/recovery-mode-config/debian/transform_netroot.debathena	                        (rev 0)
+++ trunk/debathena/config/recovery-mode-config/debian/transform_netroot.debathena	2011-02-17 15:40:25 UTC (rev 24959)
@@ -0,0 +1,21 @@
+#!/usr/bin/perl -p0
+
+my $replacement = <<'EOF';
+grep -q "^iface eth0 inet static$" /etc/network/interfaces
+if [ $? = 0]; then
+    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
+    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;


Property changes on: trunk/debathena/config/recovery-mode-config/debian/transform_netroot.debathena
___________________________________________________________________
Added: svn:executable
   + *


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