From 8425261815b87bb395a57ff1c5dd731788ae7a51 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Thu, 27 May 2010 11:58:35 -0400 Subject: [PATCH 1/1] Use the .. Perl operator to simplify prerms. invirt-console-host, invirt-dev, and all of the packages in xvm-munin-config previously used a convoluted one-liner to clean up /etc/sudoers, but we can do it much more easily using the .. operator. Taken from http://blog.ksplice.com/2010/05/top-10-perl-one-liner-tricks/ svn path=/trunk/packages/invirt-console/; revision=3011 --- debian/changelog | 6 ++++++ debian/invirt-console-host.postinst | 3 --- debian/invirt-console-host.prerm | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index e476e95..4bda8a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-console (0.2.14) unstable; urgency=low + + * Use the .. Perl operator to simplify the invirt-console-host prerm. + + -- Evan Broder Thu, 27 May 2010 11:55:53 -0400 + invirt-console (0.2.13) unstable; urgency=low * Changed dependency debathena-kerberos-config -> invirt-kerberos-config diff --git a/debian/invirt-console-host.postinst b/debian/invirt-console-host.postinst index 9f4b5a8..d2c7c08 100755 --- a/debian/invirt-console-host.postinst +++ b/debian/invirt-console-host.postinst @@ -20,9 +20,6 @@ set -e case "$1" in configure) - # Clean up the old sudoers line before we add it back - perl -i.bak -ne 's%^### (BEGIN|END) invirt-console-host\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers - cat >>/etc/sudoers <