[24003] in Source-Commits
/svn/athena r23612 - trunk/debathena/config/cluster-login-config/debian
daemon@ATHENA.MIT.EDU (Evan Broder)
Fri Mar 13 19:12:31 2009
X-Barracuda-Envelope-From: broder@mit.edu
Date: Fri, 13 Mar 2009 19:11:48 -0400
From: Evan Broder <broder@MIT.EDU>
Message-Id: <200903132311.n2DNBmWW028556@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: broder
Date: 2009-03-13 19:11:48 -0400 (Fri, 13 Mar 2009)
New Revision: 23612
Modified:
trunk/debathena/config/cluster-login-config/debian/transform_kexec.debathena
Log:
Simplify the transformation rule for /etc/default/kexec in
cluster-login-config.
Also add support for Gutsy, which called the variable USE_KEXEC
instead of LOAD_KEXEC.
Modified: trunk/debathena/config/cluster-login-config/debian/transform_kexec.debathena
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/transform_kexec.debathena 2009-03-13 23:05:41 UTC (rev 23611)
+++ trunk/debathena/config/cluster-login-config/debian/transform_kexec.debathena 2009-03-13 23:11:48 UTC (rev 23612)
@@ -1,7 +1,4 @@
#!/usr/bin/perl -0p
-my $kexec_version = `dpkg-query -W -f '\${Version}' kexec-tools`;
-# In 20080324-1, LOAD_KEXEC was changed from being 0/1 to being
-# false/true
-system("dpkg", "--compare-versions", "$kexec_version", "lt", "20080324-1");
-my $set_to = $? ? "true" : "1";
-s/^(LOAD_KEXEC=).*$/$1$set_to/m or die;
+s/^LOAD_KEXEC=false$/LOAD_KEXEC=true/ or
+ s/^LOAD_KEXEC=0$/LOAD_KEXEC=1/ or
+ s/^USE_KEXEC=0$/USE_KEXEC=1/ or die;